This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: PR target/53315: simple xtest program generates ICE
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: gcc-patches at gcc dot gnu dot org, andi-gcc at firstfloor dot org
- Cc: Andrew Pinski <apinski at cavium dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Fri, 11 May 2012 11:16:08 -0700
- Subject: PATCH: PR target/53315: simple xtest program generates ICE
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses + in constraint and match_dup in xbegin_1. OK for
trunk?
Andi, can you provide a run-time testcase patch with proper cpuid check?
Thanks.
H.J.
---
2012-05-11 Andrew Pinski <apinski@cavium.com>
H.J. Lu <hongjiu.lu@intel.com>
PR target/53315
* config/i386/i386.md (xbegin_1): Use + in constraint and
match_dup.
(xbegin): Updated.
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index c825579..b64d1d3 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -18361,9 +18361,9 @@
{
rtx label = gen_label_rtx ();
- operands[1] = force_reg (SImode, constm1_rtx);
+ operands[0] = force_reg (SImode, constm1_rtx);
- emit_jump_insn (gen_xbegin_1 (operands[0], operands[1], label));
+ emit_jump_insn (gen_xbegin_1 (operands[0], label));
emit_label (label);
LABEL_NUSES (label) = 1;
@@ -18375,13 +18375,12 @@
[(set (pc)
(if_then_else (ne (unspec [(const_int 0)] UNSPEC_XBEGIN_ABORT)
(const_int 0))
- (label_ref (match_operand 2))
+ (label_ref (match_operand 1))
(pc)))
- (set (match_operand:SI 0 "register_operand" "=a")
- (unspec_volatile:SI [(match_operand:SI 1 "register_operand" "0")]
- UNSPECV_XBEGIN))]
+ (set (match_operand:SI 0 "register_operand" "+a")
+ (unspec_volatile:SI [(match_dup 0)] UNSPECV_XBEGIN))]
"TARGET_RTM"
- "xbegin\t%l2"
+ "xbegin\t%l1"
[(set_attr "type" "other")
(set_attr "length" "6")])