[llvm] 313b747 - [X86] Add RMPQUERY to SNP instructions
Ganesh Gopalasubramanian via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 05:35:21 PST 2023
Author: Ganesh Gopalasubramanian
Date: 2023-01-10T19:01:18+05:30
New Revision: 313b747c5bf293aa86caf0da57b978a9758cd57b
URL: https://github.com/llvm/llvm-project/commit/313b747c5bf293aa86caf0da57b978a9758cd57b
DIFF: https://github.com/llvm/llvm-project/commit/313b747c5bf293aa86caf0da57b978a9758cd57b.diff
LOG: [X86] Add RMPQUERY to SNP instructions
Added:
Modified:
llvm/lib/Target/X86/X86InstrSNP.td
llvm/test/MC/Disassembler/X86/x86-64.txt
llvm/test/MC/X86/SNP-64.s
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86InstrSNP.td b/llvm/lib/Target/X86/X86InstrSNP.td
index de59f3fe27500..7fdbe3e6c3d1e 100644
--- a/llvm/lib/Target/X86/X86InstrSNP.td
+++ b/llvm/lib/Target/X86/X86InstrSNP.td
@@ -38,6 +38,11 @@ def RMPUPDATE: I<0x01, MRM_FE, (outs), (ins), "rmpupdate", []>, XD,
let Uses = [RAX] in
def RMPADJUST: I<0x01, MRM_FE, (outs), (ins), "rmpadjust", []>, XS,
Requires<[In64BitMode]>;
+
+// F3 0F 01 FD
+let Uses = [RAX, RDX], Defs = [RCX, RDX] in
+def RMPQUERY: I<0x01, MRM_FD, (outs), (ins), "rmpquery", []>, XS,
+ Requires<[In64BitMode]>;
} // SchedRW
def : InstAlias<"psmash\t{%rax|rax}", (PSMASH)>, Requires<[In64BitMode]>;
@@ -45,3 +50,4 @@ def : InstAlias<"pvalidate\t{%rax|rax}", (PVALIDATE64)>, Requires<[In64BitMode]>
def : InstAlias<"pvalidate\t{%eax|eax}", (PVALIDATE32)>, Requires<[Not64BitMode]>;
def : InstAlias<"rmpupdate\t{%rax|rax}", (RMPUPDATE)>, Requires<[In64BitMode]>;
def : InstAlias<"rmpadjust\t{%rax|rax}", (RMPADJUST)>, Requires<[In64BitMode]>;
+def : InstAlias<"rmpquery\t{%rax, %rcx, %rdx|rdx, rcx, rax}", (RMPQUERY)>, Requires<[In64BitMode]>;
diff --git a/llvm/test/MC/Disassembler/X86/x86-64.txt b/llvm/test/MC/Disassembler/X86/x86-64.txt
index 9ea036769aed5..159d9efcbf7e4 100644
--- a/llvm/test/MC/Disassembler/X86/x86-64.txt
+++ b/llvm/test/MC/Disassembler/X86/x86-64.txt
@@ -744,6 +744,9 @@
# CHECK: rmpadjust
0xf3 0x0f 0x01 0xfe
+# CHECK: rmpquery
+0xf3 0x0f 0x01 0xfd
+
# CHECK: testui
0xf3,0x0f,0x01,0xed
diff --git a/llvm/test/MC/X86/SNP-64.s b/llvm/test/MC/X86/SNP-64.s
index 7a532a10c8953..25f68eb72e63d 100644
--- a/llvm/test/MC/X86/SNP-64.s
+++ b/llvm/test/MC/X86/SNP-64.s
@@ -16,6 +16,10 @@ pvalidate
// CHECK: encoding: [0xf3,0x0f,0x01,0xfe]
rmpadjust
+// CHECK: rmpquery
+// CHECK: encoding: [0xf3,0x0f,0x01,0xfd]
+rmpquery
+
// CHECK: rmpupdate
// CHECK: encoding: [0xf2,0x0f,0x01,0xfe]
rmpupdate %rax
@@ -31,3 +35,7 @@ pvalidate %rax
// CHECK: rmpadjust
// CHECK: encoding: [0xf3,0x0f,0x01,0xfe]
rmpadjust %rax
+
+// CHECK: rmpquery
+// CHECK: encoding: [0xf3,0x0f,0x01,0xfd]
+rmpquery %rax, %rcx, %rdx
More information about the llvm-commits
mailing list