arit.c: Use __builtin_labs, not abs.

* config/cris/arit.c: Use __builtin_labs, not abs.

	* config/cris/cris.h (SET_STRIPPABLE_EXECUTABLE): Don't define.

	* config/cris/cris.c (cris_target_asm_function_epilogue): Move
	misplaced sprintf and fprintf argument.

From-SVN: r46234
This commit is contained in:
Hans-Peter Nilsson 2001-10-12 19:44:38 +00:00 committed by Hans-Peter Nilsson
parent 71a9457763
commit 44a4ca5e4f
4 changed files with 14 additions and 29 deletions

View File

@ -1,3 +1,12 @@
2001-10-12 Hans-Peter Nilsson <hp@axis.com>
* config/cris/arit.c: Use __builtin_labs, not abs.
* config/cris/cris.h (SET_STRIPPABLE_EXECUTABLE): Don't define.
* config/cris/cris.c (cris_target_asm_function_epilogue): Move
misplaced sprintf and fprintf argument.
2001-10-12 Zack Weinberg <zack@codesourcery.com>
* ABOUT-NLS, aclocal.m4: Update i18n framework from gettext 0.10.40.

View File

@ -223,7 +223,7 @@ __Div (long a, long b)
which is still 32 bits. */
sign = a ^ b;
result = __Udiv (abs (a), abs (b));
result = __Udiv (__builtin_labs (a), __builtin_labs (b));
return (sign < 0) ? -result : result;
}
@ -286,7 +286,7 @@ __Mod (long a, long b)
{
long result;
result = __Umod (abs (a), abs (b));
result = __Umod (__builtin_labs (a), __builtin_labs (b));
return (a < 0) ? -result : result;
}

View File

@ -1058,7 +1058,7 @@ cris_target_asm_function_epilogue (file, size)
/* Flush previous non-movem:ed registers. */
if (*save_last && file)
fprintf (file, save_last);
sprintf (save_last, "\tPop $%s\n");
sprintf (save_last, "\tPop $%s\n", reg_names[regno]);
}
if (last_movem_reg != -1)
@ -1140,7 +1140,7 @@ cris_target_asm_function_epilogue (file, size)
{
/* The installed EH-return address is in *this* frame, so we
need to pop it before we return. */
fprintf (file, "\tpop $srp\n", reg_names[CRIS_STACKADJ_REG]);
fprintf (file, "\tpop $srp\n");
fprintf (file, "\tret\n");
fprintf (file, "\tadd.d $%s,$sp\n", reg_names[CRIS_STACKADJ_REG]);
}

View File

@ -1714,31 +1714,7 @@ struct cum_args {int regs;};
/* (no definitions) */
/* Node: Macros for Initialization */
/* We don't want to use "strip" for anything linked with "-melinux"
"-shlib", seen by the linker as "-Ur -d -Bdynamic" in combination. */
#define SET_STRIPPABLE_EXECUTABLE(DS, ARGC, ARGV) \
do \
{ \
int i; \
int flags = 0; \
for (i = (ARGC) - 1; i > 0; i--) \
{ \
if (strcmp ((ARGV)[i], "-Ur") == 0) \
flags |= 1; \
else if (strcmp ((ARGV)[i], "-d") == 0) \
flags |= 2; \
else if (strcmp ((ARGV)[i], "-Bdynamic") == 0) \
flags |= 4; \
\
if (flags == 7) \
break; \
} \
\
(DS) = (flags != 7); \
} \
while (0)
/* (no definitions) */
/* Node: Instruction Output */