------- Comment #5 from ramana at gcc dot gnu dot org  2010-04-09 07:48 -------
Actually strike out the last patch - that's just wrong for Thumb1. This is what
I am testing currently.


Index: arm.md
===================================================================
--- arm.md      (revision 158138)
+++ arm.md      (working copy)
@@ -11200,12 +11200,18 @@
 (define_insn "arm_rev"
   [(set (match_operand:SI 0 "s_register_operand" "=r")
        (bswap:SI (match_operand:SI 1 "s_register_operand" "r")))]
-  "TARGET_EITHER && arm_arch6"
+  "TARGET_32BIT && arm_arch6"
+  "rev%?\t%0, %1"
+  [(set_attr "predicable" "yes")
+   (set_attr "length" "4")]
+)
+
+(define_insn "thumb1_rev"
+  [(set (match_operand:SI 0 "s_register_operand" "=l")
+       (bswap:SI (match_operand:SI 1 "s_register_operand" "l")))]
+  "TARGET_THUMB1 && arm_arch6"
   "rev\t%0, %1"
-  [(set (attr "length")
-        (if_then_else (eq_attr "is_thumb" "yes")
-                     (const_int 2)
-                     (const_int 4)))]
+  [(set_attr "length" "2")]
 )

 (define_expand "arm_legacy_rev"


-- 


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

Reply via email to