This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]