aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <erich@gnu.org>1995-12-08 15:47:42 +0000
committerRichard Earnshaw <erich@gnu.org>1995-12-08 15:47:42 +0000
commit481a49d69f2da33f1fa2e6d89b06bcf0e3a5ea1e (patch)
tree0197b7ba2cde9bf6238a46dbb1cf403afe3a929d /gcc
parentfd914447b4251a764c0f0d5e91931d6b1a9b54a4 (diff)
downloadgcc-481a49d69f2da33f1fa2e6d89b06bcf0e3a5ea1e.zip
gcc-481a49d69f2da33f1fa2e6d89b06bcf0e3a5ea1e.tar.gz
gcc-481a49d69f2da33f1fa2e6d89b06bcf0e3a5ea1e.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/arm/lib1funcs.asm26
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm
index acb0c1f..4057549 100644
--- a/gcc/config/arm/lib1funcs.asm
+++ b/gcc/config/arm/lib1funcs.asm
@@ -267,6 +267,14 @@ Ldiv_zero:
ret
*/
+#ifdef __APCS_26__
+#define RET movs
+#define RETCOND ^
+#else
+#define RET mov
+#define RETCOND
+#endif
+
#ifdef L_udivsi3
ip .req r12
@@ -583,14 +591,14 @@ Lend_regular_divide:
Lgot_result:
mov r0, r2
- ldmia sp!, {r4, r5, pc}
+ ldmia sp!, {r4, r5, pc}RETCOND
Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...).
bl ___div0
mov r0, #0
- ldmia sp!, {r4, r5, pc}
+ ldmia sp!, {r4, r5, pc}RETCOND
#endif /* L_udivsi3 */
@@ -917,14 +925,14 @@ Lgot_result:
rsbmi r2, r2, #0
mov r0, r2
- ldmia sp!, {r4, r5, r6, pc}
+ ldmia sp!, {r4, r5, r6, pc}RETCOND
Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...).
bl ___div0
mov r0, #0
- ldmia sp!, {r4, r5, r6, pc}
+ ldmia sp!, {r4, r5, r6, pc}RETCOND
#endif /* L_divsi3 */
@@ -1244,14 +1252,14 @@ Lend_regular_divide:
Lgot_result:
mov r0, r3
- ldmia sp!, {r4, r5, pc}
+ ldmia sp!, {r4, r5, pc}RETCOND
Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...).
bl ___div0
mov r0, #0
- ldmia sp!, {r4, r5, pc}
+ ldmia sp!, {r4, r5, pc}RETCOND
#endif /* L_umodsi3 */
@@ -1578,14 +1586,14 @@ Lgot_result:
rsbmi r3, r3, #0
mov r0, r3
- ldmia sp!, {r4, r5, r6, pc}
+ ldmia sp!, {r4, r5, r6, pc}RETCOND
Ldiv_zero:
@ Divide by zero trap. If it returns, return 0 (about as
@ wrong as possible, but that is what SunOS does...).
bl ___div0
mov r0, #0
- ldmia sp!, {r4, r5, r6, pc}
+ ldmia sp!, {r4, r5, r6, pc}RETCOND
#endif /* L_modsi3 */
@@ -1594,6 +1602,6 @@ Ldiv_zero:
.globl ___div0
.align 0
___div0:
- mov pc, lr
+ RET pc, lr
#endif /* L_divmodsi_tools */