Import a RET macro, that will use bx if the arch supports it.

Obtained from:	NetBSD
This commit is contained in:
Olivier Houchard 2004-11-09 16:45:55 +00:00
parent 904e5ace47
commit 5f2c6402db

View File

@ -139,4 +139,40 @@
.stabs __STRING(_/**/sym),1,0,0,0
#endif /* __STDC__ */
#if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__)
#define _ARM_ARCH_6
#endif
#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5__) || \
defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || \
defined (__ARM_ARCH_5TEJ__)
#define _ARM_ARCH_5
#endif
#if defined (_ARM_ARCH_5) || defined (__ARM_ARCH_4T__)
#define _ARM_ARCH_4T
#endif
#if defined (_ARM_ARCH_4T)
# define RET bx lr
# define RETeq bxeq lr
# define RETne bxne lr
# ifdef __STDC__
# define RETc(c) bx##c lr
# else
# define RETc(c) bx/**/c lr
# endif
#else
# define RET mov pc, lr
# define RETeq moveq pc, lr
# define RETne movne pc, lr
# ifdef __STDC__
# define RETc(c) mov##c pc, lr
# else
# define RETc(c) mov/**/c pc, lr
# endif
#endif
#endif /* !_MACHINE_ASM_H_ */