aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/arm/sysdep.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-12-04 21:20:42 +0000
committerRoland McGrath <roland@gnu.org>2004-12-04 21:20:42 +0000
commit577e4aa1ec5462ead3af4ba2236881ed4672f01e (patch)
tree87948205c3d9250bd57065380599325f77cc152d /sysdeps/arm/sysdep.h
parent3f488b9cddc0a49b0860a3714eb7a77019482d38 (diff)
downloadglibc-577e4aa1ec5462ead3af4ba2236881ed4672f01e.tar
glibc-577e4aa1ec5462ead3af4ba2236881ed4672f01e.tar.gz
glibc-577e4aa1ec5462ead3af4ba2236881ed4672f01e.tar.bz2
glibc-577e4aa1ec5462ead3af4ba2236881ed4672f01e.zip
* sysdeps/arm/sysdep.h: Define __USE_BX__ if bx is available.
Use it instead of __THUMB_INTERWORK__. Make RETINSTR take only a condition and a register. * sysdeps/arm/dl-machine.h: Use __USE_BX__ instead of __THUMB_INTERWORK__. (_dl_start_user): Use BX. * sysdeps/arm/strlen.S: Use DO_RET. * sysdeps/unix/arm/brk.S, sysdeps/unix/arm/fork.S, sysdeps/unix/arm/sysdep.S, sysdeps/unix/arm/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/arm/clone.S, sysdeps/unix/sysv/linux/arm/mmap.S, sysdeps/unix/sysv/linux/arm/mmap64.S, sysdeps/unix/sysv/linux/arm/socket.S, sysdeps/unix/sysv/linux/arm/sysdep.h, sysdeps/unix/sysv/linux/arm/vfork.S: Update uses of RETINSTR.
Diffstat (limited to 'sysdeps/arm/sysdep.h')
-rw-r--r--sysdeps/arm/sysdep.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/sysdeps/arm/sysdep.h b/sysdeps/arm/sysdep.h
index cb3f105afe..8ca77a60cb 100644
--- a/sysdeps/arm/sysdep.h
+++ b/sysdeps/arm/sysdep.h
@@ -19,6 +19,11 @@
#include <sysdeps/generic/sysdep.h>
+#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
+ && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__))
+# define __USE_BX__
+#endif
+
#ifdef __ASSEMBLER__
/* Syntactic details of assembler. */
@@ -50,20 +55,22 @@
#ifdef __APCS_32__
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist
-#define RETINSTR(instr, regs...)\
- instr regs
-#ifdef __THUMB_INTERWORK__
+#ifdef __USE_BX__
+#define RETINSTR(cond, reg) \
+ bx##cond reg
#define DO_RET(_reg) \
bx _reg
#else
+#define RETINSTR(cond, reg) \
+ mov##cond pc, reg
#define DO_RET(_reg) \
mov pc, _reg
#endif
#else /* APCS-26 */
#define LOADREGS(cond, base, reglist...)\
ldm##cond base,reglist^
-#define RETINSTR(instr, regs...)\
- instr##s regs
+#define RETINSTR(cond, reg) \
+ mov##cond##s pc, reg
#define DO_RET(_reg) \
movs pc, _reg
#endif