This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2 1/3] Allow memory operands for PTWRITE


From: Andi Kleen <ak@linux.intel.com>

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-15  Andi Kleen  <ak@linux.intel.com>

	* config/i386/i386.md: Allow memory operands to ptwrite.
---
 gcc/config/i386/i386.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 44db8ac954c..9c359c0ca04 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -19501,7 +19501,7 @@
    (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"
-- 
2.19.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]