S/390: Get rid of Y constraint in tabort.
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 1 Mar 2016 09:24:29 +0000 (09:24 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Tue, 1 Mar 2016 09:24:29 +0000 (09:24 +0000)
This removes the Y constraint from the tabort pattern definition.  In
this case it is easier without using substitutions.

gcc/ChangeLog:

2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.md ("*tabort_1"): Change predicate to
nonmemory_operand.  Add a second alternative to cover
register as well as const int operands.
("*tabort_1_plus"): New pattern definition.

From-SVN: r233846

gcc/ChangeLog
gcc/config/s390/s390.md

index 3178ba110e54f7c5c366d381be7221b9612dfaab..1699e1cd710e0df9e1014211bb0c87540b0e94d7 100644 (file)
@@ -1,3 +1,10 @@
+2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
+
+       * config/s390/s390.md ("*tabort_1"): Change predicate to
+       nonmemory_operand.  Add a second alternative to cover
+       register as well as const int operands.
+       ("*tabort_1_plus"): New pattern definition.
+
 2016-03-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * config/s390/s390.md ("*ashrdi3_cc_31")
index dd91383b11be4cafa64324bb2fa08419668b3450..ca58c42fe4c850c6c43541140f3e1298f53400e7 100644 (file)
 ; Transaction abort
 
 (define_expand "tabort"
-  [(unspec_volatile [(match_operand:SI 0 "shift_count_or_setmem_operand" "")]
+  [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "")]
                    UNSPECV_TABORT)]
   "TARGET_HTM && operands != NULL"
 {
 })
 
 (define_insn "*tabort_1"
-  [(unspec_volatile [(match_operand:SI 0 "shift_count_or_setmem_operand" "Y")]
+  [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "aJ")]
                    UNSPECV_TABORT)]
   "TARGET_HTM && operands != NULL"
   "tabort\t%Y0"
   [(set_attr "op_type" "S")])
 
+(define_insn "*tabort_1_plus"
+  [(unspec_volatile [(plus:SI (match_operand:SI 0 "register_operand"  "a")
+                             (match_operand:SI 1 "const_int_operand" "J"))]
+                   UNSPECV_TABORT)]
+  "TARGET_HTM && operands != NULL
+   && CONST_OK_FOR_CONSTRAINT_P (INTVAL (operands[1]), 'J', \"J\")"
+  "tabort\t%1(%0)"
+  [(set_attr "op_type" "S")])
+
 ; Transaction extract nesting depth
 
 (define_insn "etnd"