diff options
author | Paul Brook <paul@codesourcery.com> | 2005-04-30 19:40:53 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2005-04-30 19:40:53 +0000 |
commit | 4c5f98981302212d58d78e6271d8df25fe6aaf56 (patch) | |
tree | cd039051ac9ea04b6ccbc7abfde11a34ff116413 /gcc/config/arm/lib1funcs.asm | |
parent | f6c7d65b66de4abc0318718904e5947f663b9d91 (diff) | |
download | gcc-4c5f98981302212d58d78e6271d8df25fe6aaf56.zip gcc-4c5f98981302212d58d78e6271d8df25fe6aaf56.tar.gz gcc-4c5f98981302212d58d78e6271d8df25fe6aaf56.tar.bz2 |
bpabi.h (RENAME_LIBRARY_SET): Always use .thumb_set in thumb mode.
2005-04-30 Paul Brook <paul@codesourcery.com>
* config/arm/bpabi.h (RENAME_LIBRARY_SET): Always use .thumb_set in
thumb mode.
* config/arm/ieee754-df.S: Use __INTERWORKING_STUBS__.
* config/arm/ieee754-sf.S: Ditto.
* config/arm/lib1funcs.asm: Define and use __INTERWORKING_STUBS__.
(FUNC_ALIAS): Use .thumb_set for thumb routines.
From-SVN: r99043
Diffstat (limited to 'gcc/config/arm/lib1funcs.asm')
-rw-r--r-- | gcc/config/arm/lib1funcs.asm | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm index b8df889..4e3c8a3 100644 --- a/gcc/config/arm/lib1funcs.asm +++ b/gcc/config/arm/lib1funcs.asm @@ -94,10 +94,20 @@ Boston, MA 02111-1307, USA. */ # define RET bx lr # define RETc(x) bx##x lr -# if (__ARM_ARCH__ == 4) \ - && (defined(__thumb__) || defined(__THUMB_INTERWORK__)) -# define __INTERWORKING__ -# endif +/* Special precautions for interworking on armv4t. */ +# if (__ARM_ARCH__ == 4) + +/* Always use bx, not ldr pc. */ +# if (defined(__thumb__) || defined(__THUMB_INTERWORK__)) +# define __INTERWORKING__ +# endif /* __THUMB__ || __THUMB_INTERWORK__ */ + +/* Include thumb stub before arm mode code. */ +# if defined(__thumb__) && !defined(__THUMB_INTERWORK__) +# define __INTERWORKING_STUBS__ +# endif /* __thumb__ && !__THUMB_INTERWORK__ */ + +#endif /* __ARM_ARCH == 4 */ #else @@ -192,7 +202,7 @@ SYM (__\name): /* Special function that will always be coded in ARM assembly, even if in Thumb-only compilation. */ -#if defined(__thumb__) && !defined(__THUMB_INTERWORK__) +#if defined(__INTERWORKING_STUBS__) .macro ARM_FUNC_START name FUNC_START \name bx pc @@ -225,13 +235,17 @@ SYM (__\name): .macro FUNC_ALIAS new old .globl SYM (__\new) - EQUIV SYM (__\new), SYM (__\old) +#if defined (__thumb__) + .thumb_set SYM (__\new), SYM (__\old) +#else + .set SYM (__\new), SYM (__\old) +#endif .endm .macro ARM_FUNC_ALIAS new old .globl SYM (__\new) EQUIV SYM (__\new), SYM (__\old) -#ifdef __thumb__ +#if defined(__INTERWORKING_STUBS__) .set SYM (_L__\new), SYM (_L__\old) #endif .endm |