[Bug target/52294] [4.7 Regression] [ARM Thumb] generated asm code produces "branch out of range" error in gas with -Os -mcpu=cortex-a9

steven at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Feb 18 12:47:00 GMT 2012


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

--- Comment #5 from Steven Bosscher <steven at gcc dot gnu.org> 2012-02-18 12:46:00 UTC ---
(In reply to comment #4)
> (If the pattern of comment #3 is to blame, then this ...

...probably fix it.

Index: arm.md
===================================================================
--- arm.md    (revision 184318)
+++ arm.md    (working copy)
@@ -3505,7 +3505,12 @@
            (match_operand:SI 2 "nonmemory_operand" "N,l")))]
   "TARGET_THUMB1"
   "lsl\\t%0, %1, %2"
-  [(set_attr "length" "2")
+  [(set (attr "length")
+       (if_then_else
+     (eq (symbol_ref ("which_alternative"))
+             (const_int 0))
+     (const_int 4)
+     (const_int 2)))
    (set_attr "conds" "set")])

 (define_expand "ashrdi3"


And otherwise: sorry for all the noise :-)



More information about the Gcc-bugs mailing list