[llvm] r316333 - [X86] Add PTWRITE instruction for assembler and disassembler.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 08:53:21 PDT 2017
Author: ctopper
Date: Mon Oct 23 08:53:21 2017
New Revision: 316333
URL: http://llvm.org/viewvc/llvm-project?rev=316333&view=rev
Log:
[X86] Add PTWRITE instruction for assembler and disassembler.
Modified:
llvm/trunk/lib/Target/X86/X86InstrSystem.td
llvm/trunk/test/MC/Disassembler/X86/x86-32.txt
llvm/trunk/test/MC/Disassembler/X86/x86-64.txt
llvm/trunk/test/MC/X86/x86-32.s
llvm/trunk/test/MC/X86/x86-64.s
Modified: llvm/trunk/lib/Target/X86/X86InstrSystem.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSystem.td?rev=316333&r1=316332&r2=316333&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSystem.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSystem.td Mon Oct 23 08:53:21 2017
@@ -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:
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]>;
Modified: llvm/trunk/test/MC/Disassembler/X86/x86-32.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/x86-32.txt?rev=316333&r1=316332&r2=316333&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/x86-32.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/x86-32.txt Mon Oct 23 08:53:21 2017
@@ -811,3 +811,9 @@
# 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
Modified: llvm/trunk/test/MC/Disassembler/X86/x86-64.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/x86-64.txt?rev=316333&r1=316332&r2=316333&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/x86-64.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/x86-64.txt Mon Oct 23 08:53:21 2017
@@ -496,3 +496,14 @@
# 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
Modified: llvm/trunk/test/MC/X86/x86-32.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-32.s?rev=316333&r1=316332&r2=316333&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-32.s (original)
+++ llvm/trunk/test/MC/X86/x86-32.s Mon Oct 23 08:53:21 2017
@@ -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
Modified: llvm/trunk/test/MC/X86/x86-64.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/x86-64.s?rev=316333&r1=316332&r2=316333&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/x86-64.s (original)
+++ llvm/trunk/test/MC/X86/x86-64.s Mon Oct 23 08:53:21 2017
@@ -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
More information about the llvm-commits
mailing list