From: Paul Brook Date: Thu, 12 Aug 2004 16:14:52 +0000 (+0000) Subject: lib1funcs.asm (ARM_FUNC_ALIAS): Also alias _L__name. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db151e9d837b9a27d2de105869186e2f9b7ca353;p=gcc.git lib1funcs.asm (ARM_FUNC_ALIAS): Also alias _L__name. * config/arm/lib1funcs.asm (ARM_FUNC_ALIAS): Also alias _L__name. (aeabi_uidivmod, aeabi_idivmod): Provide thumb implementation. From-SVN: r85879 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cff78b4e369..3e651a98b54 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,11 @@ +2004-08-12 Paul Brook + + * config/arm/lib1funcs.asm (ARM_FUNC_ALIAS): Also alias _L__name. + (aeabi_uidivmod, aeabi_idivmod): Provide thumb implementation. + 2004-08-12 David Daney - * java/gcj.texi: Add subsection on signal usage. + * java/gcj.texi: Add subsection on signal usage. 2004-08-12 David Edelsohn diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm index cea093c9e25..61de0a30855 100644 --- a/gcc/config/arm/lib1funcs.asm +++ b/gcc/config/arm/lib1funcs.asm @@ -196,9 +196,13 @@ SYM (__\name): bx pc nop .arm -_L__\name: /* A hook to tell gdb that we've switched to ARM */ +/* A hook to tell gdb that we've switched to ARM mode. Also used to call + directly from other local arm routines. */ +_L__\name: .endm #define EQUIV .thumb_set +/* Branch directly to a function declared with ARM_FUNC_START. + Must be called in arm mode. */ .macro ARM_CALL name bl _L__\name .endm @@ -220,6 +224,9 @@ SYM (__\name): .macro ARM_FUNC_ALIAS new old .globl SYM (__\new) EQUIV SYM (__\new), SYM (__\old) +#ifdef __thumb__ + .set SYM (_L__\new), SYM (_L__\old) +#endif .endm #ifdef __thumb__ @@ -655,13 +662,22 @@ LSYM(Lgot_result): DIV_FUNC_END udivsi3 -ARM_FUNC_START aeabi_uidivmod +FUNC_START aeabi_uidivmod +#ifdef __thumb__ + push {r0, r1, lr} + bl SYM(__udivsi3) + POP {r1, r2, r3} + mul r2, r0 + sub r1, r1, r2 + bx r3 +#else stmfd sp!, { r0, r1, lr } - ARM_CALL udivsi3 + bl SYM(__udivsi3) ldmfd sp!, { r1, r2, lr } mul r3, r2, r0 sub r1, r1, r3 RET +#endif FUNC_END aeabi_uidivmod #endif /* L_udivsi3 */ @@ -784,13 +800,22 @@ LSYM(Lover12): DIV_FUNC_END divsi3 -ARM_FUNC_START aeabi_idivmod +FUNC_START aeabi_idivmod +#ifdef __thumb__ + push {r0, r1, lr} + bl SYM(__divsi3) + POP {r1, r2, r3} + mul r2, r0 + sub r1, r1, r2 + bx r3 +#else stmfd sp!, { r0, r1, lr } - ARM_CALL divsi3 + bl SYM(__divsi3) ldmfd sp!, { r1, r2, lr } mul r3, r2, r0 sub r1, r1, r3 RET +#endif FUNC_END aeabi_idivmod #endif /* L_divsi3 */