Patchwork [i386] RTM support

login
register
mail settings
Submitter Uros Bizjak
Date March 13, 2012, 7:14 p.m.
Message ID <CAFULd4YYdpv+fpXj2K7wSPU3Fszr7-XvfF+sUJuxGMjLEat8fg@mail.gmail.com>
Download mbox | patch
Permalink /patch/146471/
State New
Headers show

Comments

Uros Bizjak - March 13, 2012, 7:14 p.m.
On Sun, Mar 11, 2012 at 10:16 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>>
>> The patch is OK for mainline, if there are no further comments in next 24h.
>
> According to Tobias's input, I've added few lines about RTM to
> doc/invoke.texi. If no objections - I'll commit the patch tomorrow.

A small no-op change - there is no need for a constraint in an expand
pattern.  Plus some formatting.

2012-03-13  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (xbegin): Remove constraint from expander.

Tested on x86_64-pc-linux-gnu, committed to mainline SVN.

Uros.
Kirill Yukhin - March 14, 2012, 6:58 a.m.
Thanks!

K

On Tue, Mar 13, 2012 at 11:14 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Sun, Mar 11, 2012 at 10:16 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
>>>
>>> The patch is OK for mainline, if there are no further comments in next 24h.
>>
>> According to Tobias's input, I've added few lines about RTM to
>> doc/invoke.texi. If no objections - I'll commit the patch tomorrow.
>
> A small no-op change - there is no need for a constraint in an expand
> pattern.  Plus some formatting.
>
> 2012-03-13  Uros Bizjak  <ubizjak@gmail.com>
>
>        * config/i386/i386.md (xbegin): Remove constraint from expander.
>
> Tested on x86_64-pc-linux-gnu, committed to mainline SVN.
>
> Uros.
>
> Index: i386.md
> ===================================================================
> --- i386.md     (revision 185350)
> +++ i386.md     (working copy)
> @@ -18206,7 +18206,7 @@
>    (set_attr "memory" "unknown")])
>
>  (define_expand "xbegin"
> -  [(set (match_operand:SI 0 "register_operand" "=a")
> +  [(set (match_operand:SI 0 "register_operand" "")
>        (unspec_volatile:SI [(match_dup 1)] UNSPECV_XBEGIN))]
>   "TARGET_RTM"
>  {
> @@ -18258,8 +18258,8 @@
>  {
>   emit_insn (gen_xtest_1 ());
>
> -  ix86_expand_setcc (operands[0], EQ, gen_rtx_REG (CCZmode,
> FLAGS_REG), const0_rtx);
> -
> +  ix86_expand_setcc (operands[0], EQ,
> +                    gen_rtx_REG (CCZmode, FLAGS_REG), const0_rtx);
>   DONE;
>  })
Hans-Peter Nilsson - March 17, 2012, 4:09 a.m.
On Tue, 13 Mar 2012, Uros Bizjak wrote:
> A small no-op change - there is no need for a constraint in an expand
> pattern.  Plus some formatting.

If you want to remove it, then remove it, don't just empty it. ;)

> 2012-03-13  Uros Bizjak  <ubizjak@gmail.com>
>
> 	* config/i386/i386.md (xbegin): Remove constraint from expander.
>
> Tested on x86_64-pc-linux-gnu, committed to mainline SVN.
>
> Uros.
>
> Index: i386.md
> ===================================================================
> --- i386.md     (revision 185350)
> +++ i386.md     (working copy)
> @@ -18206,7 +18206,7 @@
>     (set_attr "memory" "unknown")])
>
>  (define_expand "xbegin"
> -  [(set (match_operand:SI 0 "register_operand" "=a")
> +  [(set (match_operand:SI 0 "register_operand" "")

+  [(set (match_operand:SI 0 "register_operand")

brgds, H-P

Patch

Index: i386.md
===================================================================
--- i386.md     (revision 185350)
+++ i386.md     (working copy)
@@ -18206,7 +18206,7 @@ 
    (set_attr "memory" "unknown")])

 (define_expand "xbegin"
-  [(set (match_operand:SI 0 "register_operand" "=a")
+  [(set (match_operand:SI 0 "register_operand" "")
        (unspec_volatile:SI [(match_dup 1)] UNSPECV_XBEGIN))]
   "TARGET_RTM"
 {
@@ -18258,8 +18258,8 @@ 
 {
   emit_insn (gen_xtest_1 ());

-  ix86_expand_setcc (operands[0], EQ, gen_rtx_REG (CCZmode,
FLAGS_REG), const0_rtx);
-
+  ix86_expand_setcc (operands[0], EQ,
+                    gen_rtx_REG (CCZmode, FLAGS_REG), const0_rtx);
   DONE;
 })