[PATCH] D135934: [X86] Add MSRLIST instructions.

Freddy, Ye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 18:43:19 PDT 2022


FreddyYe updated this revision to Diff 468388.
FreddyYe marked an inline comment as done.
FreddyYe added a comment.

Address comment.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135934/new/

https://reviews.llvm.org/D135934

Files:
  llvm/docs/ReleaseNotes.rst
  llvm/lib/Target/X86/X86InstrSystem.td
  llvm/test/MC/Disassembler/X86/x86-64-rdmsrlist_wrmsrlist.txt
  llvm/test/MC/X86/x86-64-rdmsrlist_wrmsrlist.s


Index: llvm/test/MC/X86/x86-64-rdmsrlist_wrmsrlist.s
===================================================================
--- /dev/null
+++ llvm/test/MC/X86/x86-64-rdmsrlist_wrmsrlist.s
@@ -0,0 +1,10 @@
+// RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s
+// RUN: llvm-mc -triple x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
+
+// CHECK: rdmsrlist
+// CHECK: encoding: [0xf2,0x0f,0x01,0xc6]
+          rdmsrlist
+
+// CHECK: wrmsrlist
+// CHECK: encoding: [0xf3,0x0f,0x01,0xc6]
+          wrmsrlist
Index: llvm/test/MC/Disassembler/X86/x86-64-rdmsrlist_wrmsrlist.txt
===================================================================
--- /dev/null
+++ llvm/test/MC/Disassembler/X86/x86-64-rdmsrlist_wrmsrlist.txt
@@ -0,0 +1,10 @@
+# RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s --check-prefixes=ATT
+# RUN: llvm-mc --disassemble %s -triple=x86_64 -x86-asm-syntax=intel --output-asm-variant=1 | FileCheck %s --check-prefixes=INTEL
+
+# ATT:   rdmsrlist
+# INTEL: rdmsrlist
+0xf2,0x0f,0x01,0xc6
+
+# ATT:   wrmsrlist
+# INTEL: wrmsrlist
+0xf3,0x0f,0x01,0xc6
Index: llvm/lib/Target/X86/X86InstrSystem.td
===================================================================
--- llvm/lib/Target/X86/X86InstrSystem.td
+++ llvm/lib/Target/X86/X86InstrSystem.td
@@ -428,6 +428,11 @@
 let Defs = [EAX, EDX], Uses = [ECX] in
 def RDMSR : I<0x32, RawFrm, (outs), (ins), "rdmsr", []>, TB;
 
+let Uses = [RSI, RDI, RCX], Predicates = [In64BitMode] in
+def WRMSRNLIST : I<0x01, MRM_C6, (outs), (ins), "wrmsrlist", []>, XS;
+let Uses = [RSI, RDI, RCX], Predicates = [In64BitMode] in
+def RDMSRNLIST : I<0x01, MRM_C6, (outs), (ins), "rdmsrlist", []>, XD;
+
 let Defs = [RAX, RDX], Uses = [ECX] in
 def RDPMC : I<0x33, RawFrm, (outs), (ins), "rdpmc", []>, TB;
 
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -131,6 +131,8 @@
 Changes to the X86 Backend
 --------------------------
 
+* Add support for the ``RDMSRLIST``, ``WRMSRLIST`` instruction.
+
 Changes to the OCaml bindings
 -----------------------------
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135934.468388.patch
Type: text/x-patch
Size: 2186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221018/863aff79/attachment-0001.bin>


More information about the llvm-commits mailing list