Commit 481a49d6 by Richard Earnshaw

lib1funcs.asm (RET, RETCOND): Define according to whether we are compiling for 32 or 26 bit mode.

	* arm/lib1funcs.asm (RET, RETCOND): Define according to whether we
	are compiling for 32 or 26 bit mode.
	(all return instructions): Use RET or RETCOND as appropriate.

From-SVN: r10690
parent fd914447
...@@ -267,6 +267,14 @@ Ldiv_zero: ...@@ -267,6 +267,14 @@ Ldiv_zero:
ret ret
*/ */
#ifdef __APCS_26__
#define RET movs
#define RETCOND ^
#else
#define RET mov
#define RETCOND
#endif
#ifdef L_udivsi3 #ifdef L_udivsi3
ip .req r12 ip .req r12
...@@ -583,14 +591,14 @@ Lend_regular_divide: ...@@ -583,14 +591,14 @@ Lend_regular_divide:
Lgot_result: Lgot_result:
mov r0, r2 mov r0, r2
ldmia sp!, {r4, r5, pc} ldmia sp!, {r4, r5, pc}RETCOND
Ldiv_zero: Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as @ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...). @ wrong as possible, but that is what SunOS does...).
bl ___div0 bl ___div0
mov r0, #0 mov r0, #0
ldmia sp!, {r4, r5, pc} ldmia sp!, {r4, r5, pc}RETCOND
#endif /* L_udivsi3 */ #endif /* L_udivsi3 */
...@@ -917,14 +925,14 @@ Lgot_result: ...@@ -917,14 +925,14 @@ Lgot_result:
rsbmi r2, r2, #0 rsbmi r2, r2, #0
mov r0, r2 mov r0, r2
ldmia sp!, {r4, r5, r6, pc} ldmia sp!, {r4, r5, r6, pc}RETCOND
Ldiv_zero: Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as @ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...). @ wrong as possible, but that is what SunOS does...).
bl ___div0 bl ___div0
mov r0, #0 mov r0, #0
ldmia sp!, {r4, r5, r6, pc} ldmia sp!, {r4, r5, r6, pc}RETCOND
#endif /* L_divsi3 */ #endif /* L_divsi3 */
...@@ -1244,14 +1252,14 @@ Lend_regular_divide: ...@@ -1244,14 +1252,14 @@ Lend_regular_divide:
Lgot_result: Lgot_result:
mov r0, r3 mov r0, r3
ldmia sp!, {r4, r5, pc} ldmia sp!, {r4, r5, pc}RETCOND
Ldiv_zero: Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as @ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...). @ wrong as possible, but that is what SunOS does...).
bl ___div0 bl ___div0
mov r0, #0 mov r0, #0
ldmia sp!, {r4, r5, pc} ldmia sp!, {r4, r5, pc}RETCOND
#endif /* L_umodsi3 */ #endif /* L_umodsi3 */
...@@ -1578,14 +1586,14 @@ Lgot_result: ...@@ -1578,14 +1586,14 @@ Lgot_result:
rsbmi r3, r3, #0 rsbmi r3, r3, #0
mov r0, r3 mov r0, r3
ldmia sp!, {r4, r5, r6, pc} ldmia sp!, {r4, r5, r6, pc}RETCOND
Ldiv_zero: Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as @ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...). @ wrong as possible, but that is what SunOS does...).
bl ___div0 bl ___div0
mov r0, #0 mov r0, #0
ldmia sp!, {r4, r5, r6, pc} ldmia sp!, {r4, r5, r6, pc}RETCOND
#endif /* L_modsi3 */ #endif /* L_modsi3 */
...@@ -1594,6 +1602,6 @@ Ldiv_zero: ...@@ -1594,6 +1602,6 @@ Ldiv_zero:
.globl ___div0 .globl ___div0
.align 0 .align 0
___div0: ___div0:
mov pc, lr RET pc, lr
#endif /* L_divmodsi_tools */ #endif /* L_divmodsi_tools */
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