]> granicus.if.org Git - llvm/commitdiff
[X86] Add PTWRITE instruction for assembler and disassembler.
authorCraig Topper <craig.topper@intel.com>
Mon, 23 Oct 2017 15:53:21 +0000 (15:53 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 23 Oct 2017 15:53:21 +0000 (15:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316333 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrSystem.td
test/MC/Disassembler/X86/x86-32.txt
test/MC/Disassembler/X86/x86-64.txt
test/MC/X86/x86-32.s
test/MC/X86/x86-64.s

index c95aa28615207ca03ab629a9efcbfbc3903d546a..2407ced9f9f0e639bab599e31262cf2e76622df2 100644 (file)
@@ -506,10 +506,10 @@ let Uses = [EDX, EAX] in {
 let Predicates = [HasXSAVE] in {
   def XSAVE : I<0xAE, MRM4m, (outs), (ins opaque512mem:$dst),
                 "xsave\t$dst",
-                [(int_x86_xsave addr:$dst, EDX, EAX)]>, TB;
+                [(int_x86_xsave addr:$dst, EDX, EAX)]>, PS;
   def XSAVE64 : RI<0xAE, MRM4m, (outs), (ins opaque512mem:$dst),
                    "xsave64\t$dst",
-                   [(int_x86_xsave64 addr:$dst, EDX, EAX)]>, TB, Requires<[In64BitMode]>;
+                   [(int_x86_xsave64 addr:$dst, EDX, EAX)]>, PS, Requires<[In64BitMode]>;
   def XRSTOR : I<0xAE, MRM5m, (outs), (ins opaque512mem:$dst),
                  "xrstor\t$dst",
                  [(int_x86_xrstor addr:$dst, EDX, EAX)]>, TB;
@@ -644,3 +644,15 @@ def RDPID32 : I<0xC7, MRM7r, (outs GR32:$src), (ins),
 def RDPID64 : I<0xC7, MRM7r, (outs GR64:$src), (ins),
               "rdpid\t$src", []>, XS,
               Requires<[In64BitMode]>;
+
+//===----------------------------------------------------------------------===//
+// PTWRITE Instruction
+def PTWRITEm: I<0xAE, MRM4m, (outs), (ins i32mem:$dst),
+                "ptwrite{l}\t$dst", []>, XS;
+def PTWRITE64m : RI<0xAE, MRM4m, (outs), (ins i64mem:$dst),
+                    "ptwrite{q}\t$dst", []>, XS, Requires<[In64BitMode]>;
+
+def PTWRITEr : I<0xAE, MRM4r, (outs), (ins GR32:$dst),
+                "ptwrite{l}\t$dst", []>, XS;
+def PTWRITE64r : RI<0xAE, MRM4r, (outs), (ins GR64:$dst),
+                   "ptwrite{q}\t$dst", []>, XS, Requires<[In64BitMode]>;
index b069de2fd515d348b5cc403b01a656dbdc0a848b..4211721ec48b670d3b46bbd1d3cec95318ee1d7d 100644 (file)
 
 # CHECK: rdpid %eax
 0xf3 0x0f 0xc7 0xf8
+
+# CHECK: ptwritel -559038737(%ebx,%ecx,8)
+0xf3 0x0f 0xae 0xa4 0xcb 0xef 0xbe 0xad 0xde
+
+# CHECK: ptwritel %eax
+0xf3 0x0f 0xae 0xe0
index 93026680e2a27389603d00544c9330707049cbea..05ea82d1302397bc605757c46690de8b6682a25a 100644 (file)
 # CHECK: movw    %bx, %cs:(%esi,%ebp)
 0x2e 0x66 0x67 0x89 0x1c 0x2e
 
+# CHECK: ptwritel -559038737(%rbx,%rcx,8)
+0xf3 0x0f 0xae 0xa4 0xcb 0xef 0xbe 0xad 0xde
+
+# CHECK: ptwritel %eax
+0xf3 0x0f 0xae 0xe0
+
+# CHECK: ptwriteq -559038737(%rbx,%rcx,8)
+0xf3 0x48 0x0f 0xae 0xa4 0xcb 0xef 0xbe 0xad 0xde
+
+# CHECK: ptwriteq %rax
+0xf3 0x48 0x0f 0xae 0xe0
index 80acbba6ce8d651db045403e776a6493f0e38889..9171a07233b986cbb4494142f75bcb2902e223b5 100644 (file)
@@ -1101,3 +1101,11 @@ data16 lgdt 4(%eax)
 // CHECK: rdpid %eax
 // CHECK: encoding: [0xf3,0x0f,0xc7,0xf8]
 rdpid %eax
+
+// CHECK: ptwritel 3735928559(%ebx,%ecx,8)
+// CHECK:  encoding: [0xf3,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde]
+ptwritel 0xdeadbeef(%ebx,%ecx,8)
+
+// CHECK: ptwritel %eax
+// CHECK:  encoding: [0xf3,0x0f,0xae,0xe0]
+ptwritel %eax
index 96d775270b5d0106c05f9c15cffd70e84c0ceb96..1afc3f5683a30dd340e528119c80c46974d69b92 100644 (file)
@@ -1531,3 +1531,19 @@ nopq     %rax
 // CHECK: rdpid %rax
 // CHECK: encoding: [0xf3,0x0f,0xc7,0xf8]
 rdpid %rax
+
+// CHECK: ptwritel 3735928559(%rbx,%rcx,8)
+// CHECK:  encoding: [0xf3,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde]
+ptwritel 0xdeadbeef(%rbx,%rcx,8)
+
+// CHECK: ptwritel %eax
+// CHECK:  encoding: [0xf3,0x0f,0xae,0xe0]
+ptwritel %eax
+
+// CHECK: ptwriteq 3735928559(%rbx,%rcx,8)
+// CHECK:  encoding: [0xf3,0x48,0x0f,0xae,0xa4,0xcb,0xef,0xbe,0xad,0xde]
+ptwriteq 0xdeadbeef(%rbx,%rcx,8)
+
+// CHECK: ptwriteq %rax
+// CHECK:  encoding: [0xf3,0x48,0x0f,0xae,0xe0]
+ptwriteq %rax