]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
constraints.md (Ps, Pt): New constraint letters.
authorJulian Brown <julian@codesourcery.com>
Mon, 7 Dec 2009 20:34:53 +0000 (20:34 +0000)
committerJulian Brown <jules@gcc.gnu.org>
Mon, 7 Dec 2009 20:34:53 +0000 (20:34 +0000)
gcc/
* config/arm/constraints.md (Ps, Pt): New constraint letters.
* config/arm/thumb2.md (*thumb2_addsi_short): Tighten constraints.

From-SVN: r155054

gcc/ChangeLog
gcc/config/arm/constraints.md
gcc/config/arm/thumb2.md

index b322034480ab38efc25fac8214e69e6811dfde55..db2c15d7ba08ded52bb5022e73709f67fa3be9b0 100644 (file)
@@ -1,3 +1,8 @@
+2009-12-07  Julian Brown  <julian@codesourcery.com>
+
+       * config/arm/constraints.md (Ps, Pt): New constraint letters.
+       * config/arm/thumb2.md (*thumb2_addsi_short): Tighten constraints.
+
 2009-12-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        PR other/40302
index c40d695f0d8b31dc9cbcf4b4a7dc44a8d276cff3..cb75558984c98198063b14cd795a9f4c2358d4d1 100644 (file)
@@ -31,6 +31,7 @@
 ;; The following multi-letter normal constraints have been used:
 ;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv, Dy
 ;; in Thumb-1 state: Pa, Pb
+;; in Thumb-2 state: Ps, Pt
 
 ;; The following memory constraints have been used:
 ;; in ARM/Thumb-2 state: Q, Ut, Uv, Uy, Un, Um, Us
        (match_test "TARGET_THUMB1 && ival >= -262 && ival <= 262
                    && (ival > 255 || ival < -255)")))
 
+(define_constraint "Ps"
+  "@internal In Thumb-2 state a constant in the range -255 to +255"
+  (and (match_code "const_int")
+       (match_test "TARGET_THUMB2 && ival >= -255 && ival <= 255")))
+
+(define_constraint "Pt"
+  "@internal In Thumb-2 state a constant in the range -7 to +7"
+  (and (match_code "const_int")
+       (match_test "TARGET_THUMB2 && ival >= -7 && ival <= 7")))
+
 (define_constraint "G"
  "In ARM/Thumb-2 state a valid FPA immediate constant."
  (and (match_code "const_double")
index cd317f1eae9ea06886e8e8984dd1705b0fa9d187..5e4eeedd1b60300830a5bfe1a0979537b9782e85 100644 (file)
 )
 
 (define_insn "*thumb2_addsi_short"
-  [(set (match_operand:SI 0 "low_register_operand" "=l")
-       (plus:SI (match_operand:SI 1 "low_register_operand" "l")
-                (match_operand:SI 2 "low_reg_or_int_operand" "lIL")))
+  [(set (match_operand:SI 0 "low_register_operand" "=l,l")
+       (plus:SI (match_operand:SI 1 "low_register_operand" "l,0")
+                (match_operand:SI 2 "low_reg_or_int_operand" "lPt,Ps")))
    (clobber (reg:CC CC_REGNUM))]
   "TARGET_THUMB2 && reload_completed"
   "*