Commit db151e9d by Paul Brook

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
parent 02b75262
2004-08-12 Paul Brook <paul@codesourcery.com>
* config/arm/lib1funcs.asm (ARM_FUNC_ALIAS): Also alias _L__name.
(aeabi_uidivmod, aeabi_idivmod): Provide thumb implementation.
2004-08-12 David Daney <ddaney@avtrex.com> 2004-08-12 David Daney <ddaney@avtrex.com>
* java/gcj.texi: Add subsection on signal usage. * java/gcj.texi: Add subsection on signal usage.
2004-08-12 David Edelsohn <edelsohn@gnu.org> 2004-08-12 David Edelsohn <edelsohn@gnu.org>
......
...@@ -196,9 +196,13 @@ SYM (__\name): ...@@ -196,9 +196,13 @@ SYM (__\name):
bx pc bx pc
nop nop
.arm .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 .endm
#define EQUIV .thumb_set #define EQUIV .thumb_set
/* Branch directly to a function declared with ARM_FUNC_START.
Must be called in arm mode. */
.macro ARM_CALL name .macro ARM_CALL name
bl _L__\name bl _L__\name
.endm .endm
...@@ -220,6 +224,9 @@ SYM (__\name): ...@@ -220,6 +224,9 @@ SYM (__\name):
.macro ARM_FUNC_ALIAS new old .macro ARM_FUNC_ALIAS new old
.globl SYM (__\new) .globl SYM (__\new)
EQUIV SYM (__\new), SYM (__\old) EQUIV SYM (__\new), SYM (__\old)
#ifdef __thumb__
.set SYM (_L__\new), SYM (_L__\old)
#endif
.endm .endm
#ifdef __thumb__ #ifdef __thumb__
...@@ -655,13 +662,22 @@ LSYM(Lgot_result): ...@@ -655,13 +662,22 @@ LSYM(Lgot_result):
DIV_FUNC_END udivsi3 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 } stmfd sp!, { r0, r1, lr }
ARM_CALL udivsi3 bl SYM(__udivsi3)
ldmfd sp!, { r1, r2, lr } ldmfd sp!, { r1, r2, lr }
mul r3, r2, r0 mul r3, r2, r0
sub r1, r1, r3 sub r1, r1, r3
RET RET
#endif
FUNC_END aeabi_uidivmod FUNC_END aeabi_uidivmod
#endif /* L_udivsi3 */ #endif /* L_udivsi3 */
...@@ -784,13 +800,22 @@ LSYM(Lover12): ...@@ -784,13 +800,22 @@ LSYM(Lover12):
DIV_FUNC_END divsi3 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 } stmfd sp!, { r0, r1, lr }
ARM_CALL divsi3 bl SYM(__divsi3)
ldmfd sp!, { r1, r2, lr } ldmfd sp!, { r1, r2, lr }
mul r3, r2, r0 mul r3, r2, r0
sub r1, r1, r3 sub r1, r1, r3
RET RET
#endif
FUNC_END aeabi_idivmod FUNC_END aeabi_idivmod
#endif /* L_divsi3 */ #endif /* L_divsi3 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment