This removes the Y constraint from the tabort pattern definition. In
this case it is easier without using substitutions.
gcc/ChangeLog:
* 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.
---
gcc/config/s390/s390.md | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index a058f58..3ce687c 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -10697,7 +10697,7 @@
; 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"
{
@@ -10712,10 +10712,21 @@
})
(define_insn "*tabort_1"
- [(unspec_volatile [(match_operand:SI 0 "shift_count_or_setmem_operand" "Y")]
+ [(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "a,J")]
UNSPECV_TABORT)]
"TARGET_HTM && operands != NULL"
- "tabort\t%Y0"
+ "@
+ tabort\t0(%0)
+ tabort\t%0"
+ [(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
--
1.9.1