------- Comment #3 from ramana at gcc dot gnu dot org  2010-03-19 23:15 -------
While working on another bug I noticed this macro definition for Thumb2  - the
comment in that macro is self explanatory.  

Trying just the patch below shows a nice code size difference for Thumb2 for
the test case at the cost of increased callee saved register usage.  I have no
intention on working on this bug in the near future but must point out that
this change could cost us code size elsewhere and it probably needs further
tweaking and further benchmarking. 

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 26ffaf8..6e05395 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -771,7 +771,7 @@ extern int arm_structure_size_boundary;
        fixed_regs[regno] = call_used_regs[regno] = 1;          \
     }                                                          \
                                                                \
-  if (TARGET_THUMB && optimize_size)                           \
+  if (TARGET_THUMB1 && optimize_size)                          \
     {                                                          \
       /* When optimizing for size, it's better not to use      \
         the HI regs, because of the overhead of stacking       \


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43216

Reply via email to