diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-02-18 17:29:58 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2010-02-18 17:29:58 +0000 |
commit | 8168ccc0d9a0b6f9d265ef9570a60e0771b8358a (patch) | |
tree | 74f1ddd834fa15feb129b2c92c6e8e6ffd96025a | |
parent | 2f95713bd99dda1e17866184eafbb404be5abde9 (diff) | |
download | gcc-8168ccc0d9a0b6f9d265ef9570a60e0771b8358a.zip gcc-8168ccc0d9a0b6f9d265ef9570a60e0771b8358a.tar.gz gcc-8168ccc0d9a0b6f9d265ef9570a60e0771b8358a.tar.bz2 |
lib1funcs.asm (__prefer_thumb__): New define.
2010-02-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config/arm/lib1funcs.asm (__prefer_thumb__): New define.
(udivsi3, aeabi_uidivmod, divsi3, aeabi_idivmod): Use Thumb-1 variant
if __prefer_thumb__ is defined.
From-SVN: r156868
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arm/lib1funcs.asm | 20 |
2 files changed, 22 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc1135d..e483f91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-02-18 Sebastian Huber <sebastian.huber@embedded-brains.de> + + * config/arm/lib1funcs.asm (__prefer_thumb__): New define. + (udivsi3, aeabi_uidivmod, divsi3, aeabi_idivmod): Use Thumb-1 variant + if __prefer_thumb__ is defined. + 2010-02-18 Martin Jambor <mjambor@suse.cz> PR tree-optimization/43066 diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm index 1035a3c..d383b8e 100644 --- a/gcc/config/arm/lib1funcs.asm +++ b/gcc/config/arm/lib1funcs.asm @@ -112,6 +112,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #error Unable to determine architecture. #endif +/* There are times when we might prefer Thumb1 code even if ARM code is + permitted, for example, the code might be smaller, or there might be + interworking problems with switching to ARM state if interworking is + disabled. */ +#if (defined(__thumb__) \ + && !defined(__thumb2__) \ + && (!defined(__THUMB_INTERWORK__) \ + || defined (__OPTIMIZE_SIZE__) \ + || defined(__ARM_ARCH_6M__))) +# define __prefer_thumb__ +#endif + /* How to return from a function call depends on the architecture variant. */ #if (__ARM_ARCH__ > 4) || defined(__ARM_ARCH_4T__) @@ -917,7 +929,7 @@ LSYM(Lgot_result): /* ------------------------------------------------------------------------ */ #ifdef L_udivsi3 -#if defined(__ARM_ARCH_6M__) +#if defined(__prefer_thumb__) FUNC_START udivsi3 FUNC_ALIAS aeabi_uidiv udivsi3 @@ -974,7 +986,7 @@ LSYM(udivsi3_skip_div0_test): DIV_FUNC_END udivsi3 unsigned -#if defined(__ARM_ARCH_6M__) +#if defined(__prefer_thumb__) FUNC_START aeabi_uidivmod cmp r1, #0 beq LSYM(Ldiv0) @@ -1042,7 +1054,7 @@ LSYM(Lover10): /* ------------------------------------------------------------------------ */ #ifdef L_divsi3 -#if defined(__ARM_ARCH_6M__) +#if defined(__prefer_thumb__) FUNC_START divsi3 FUNC_ALIAS aeabi_idiv divsi3 @@ -1130,7 +1142,7 @@ LSYM(divsi3_skip_div0_test): DIV_FUNC_END divsi3 signed -#if defined(__ARM_ARCH_6M__) +#if defined(__prefer_thumb__) FUNC_START aeabi_idivmod cmp r1, #0 beq LSYM(Ldiv0) |