public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 6/9] S/390: Get rid of Y constraint in tabort.
Date: Tue, 23 Feb 2016 14:33:00 -0000	[thread overview]
Message-ID: <1456238004-21150-7-git-send-email-krebbel@linux.vnet.ibm.com> (raw)
In-Reply-To: <1456238004-21150-1-git-send-email-krebbel@linux.vnet.ibm.com>

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

  parent reply	other threads:[~2016-02-23 14:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23 14:33 [PATCH 0/9] S/390 rework shift count handling - v2 Andreas Krebbel
2016-02-23 14:33 ` [PATCH 1/9] gensupport: Fix define_subst operand renumbering Andreas Krebbel
2016-02-23 14:33 ` [PATCH 8/9] S/390: Use define_subst for the setmem patterns Andreas Krebbel
2016-02-23 14:33 ` Andreas Krebbel [this message]
2016-02-23 14:33 ` [PATCH 9/9] S/390: Disallow SImode in s390_decompose_address Andreas Krebbel
2016-02-23 14:33 ` [PATCH 4/9] S/390: Get rid of Y constraint in left and logical right shift patterns Andreas Krebbel
2016-02-23 14:33 ` [PATCH 7/9] S/390: Get rid of Y constraint in vector.md Andreas Krebbel
2016-02-23 14:33 ` [PATCH 5/9] S/390: Get rid of Y constraint in arithmetic right shift patterns Andreas Krebbel
2016-02-23 14:33 ` [PATCH 3/9] S/390: Get rid of Y constraint in rotate patterns Andreas Krebbel
2016-02-25 17:14   ` Ulrich Weigand
2016-02-23 14:33 ` [PATCH 2/9] S/390: Use enabled attribute overrides to disable alternatives Andreas Krebbel
  -- strict thread matches above, loose matches on Subject: below --
2016-02-29  8:47 [PATCH 0/9] S/390 rework shift count handling - v3 Andreas Krebbel
2016-02-29  8:47 ` [PATCH 6/9] S/390: Get rid of Y constraint in tabort Andreas Krebbel
2016-01-14 16:34 [PATCH 0/9] S/390 rework shift count handling Andreas Krebbel
2016-01-14 16:39 ` [PATCH 6/9] S/390: Get rid of Y constraint in tabort Andreas Krebbel
2016-02-01 13:36   ` Ulrich Weigand
2016-02-23 14:28     ` Andreas Krebbel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1456238004-21150-7-git-send-email-krebbel@linux.vnet.ibm.com \
    --to=krebbel@linux.vnet.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).