Allow memory operands for PTWRITE
authorAndi Kleen <ak@linux.intel.com>
Fri, 16 Nov 2018 15:46:31 +0000 (15:46 +0000)
committerAndi Kleen <ak@gcc.gnu.org>
Fri, 16 Nov 2018 15:46:31 +0000 (15:46 +0000)
The earlier PTWRITE builtin definition was unnecessarily restrictive,
only allowing register input to PTWRITE. The instruction actually
supports memory operands too, so allow that too.

gcc/:

2018-11-16  Andi Kleen  <ak@linux.intel.com>

* config/i386/i386.md: Allow memory operands to ptwrite.

From-SVN: r266211

gcc/ChangeLog
gcc/config/i386/i386.md

index 07cdcc75bd86cc68e8af91fb8ebdb6e83b489702..d842ae9fd9aed5b752b6a82ee9aaf40cbe5aaa76 100644 (file)
@@ -1,3 +1,7 @@
+2018-11-16  Andi Kleen  <ak@linux.intel.com>
+
+       * config/i386/i386.md: Allow memory operands to ptwrite.
+
 2018-11-16  Michael Matz  <matz@suse.de>
 
        * system.h (PRsa): New macro.
index 44db8ac954cf5e2445c1c15b5debd853e8350634..9c359c0ca0433a412d120b45abc154d2bb06c274 100644 (file)
    (set_attr "prefix_extra" "2")])
 
 (define_insn "ptwrite<mode>"
-  [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")]
+  [(unspec_volatile [(match_operand:SWI48 0 "nonimmediate_operand" "rm")]
                    UNSPECV_PTWRITE)]
   "TARGET_PTWRITE"
   "ptwrite\t%0"