[PATCH] D155142: Add PBNDKB instruction.

Freddy, Ye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 18:56:14 PDT 2023


FreddyYe created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
FreddyYe requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

For more details about this instruction, please refer to the latest ISE document: https://www.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155142

Files:
  llvm/docs/ReleaseNotes.rst
  llvm/lib/Target/X86/X86InstrSystem.td
  llvm/test/MC/Disassembler/X86/pbndkb.txt
  llvm/test/MC/X86/pbndkb.s


Index: llvm/test/MC/X86/pbndkb.s
===================================================================
--- /dev/null
+++ llvm/test/MC/X86/pbndkb.s
@@ -0,0 +1,7 @@
+// 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: pbndkb
+// CHECK: encoding: [0x0f,0x01,0xc7]
+          pbndkb
+
Index: llvm/test/MC/Disassembler/X86/pbndkb.txt
===================================================================
--- /dev/null
+++ llvm/test/MC/Disassembler/X86/pbndkb.txt
@@ -0,0 +1,6 @@
+# RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s
+# RUN: llvm-mc --disassemble %s -triple=x86_64 -x86-asm-syntax=intel --output-asm-variant=1 | FileCheck %s
+
+# CHECK: pbndkb
+0x0f,0x01,0xc7
+
Index: llvm/lib/Target/X86/X86InstrSystem.td
===================================================================
--- llvm/lib/Target/X86/X86InstrSystem.td
+++ llvm/lib/Target/X86/X86InstrSystem.td
@@ -430,6 +430,8 @@
 let Defs = [EAX, EDX], Uses = [ECX] in
 def RDMSR : I<0x32, RawFrm, (outs), (ins), "rdmsr", []>, TB;
 
+let Uses = [RAX, RBX, RCX], Predicates = [In64BitMode] in
+def PBNDKB : I<0x01, MRM_C7, (outs), (ins), "pbndkb", []>, PS;
 let Uses = [RSI, RDI, RCX], Predicates = [In64BitMode] in {
 def WRMSRLIST : I<0x01, MRM_C6, (outs), (ins), "wrmsrlist", []>, XS;
 def RDMSRLIST : I<0x01, MRM_C6, (outs), (ins), "rdmsrlist", []>, XD;
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -276,6 +276,7 @@
 
 * ``__builtin_unpredictable`` (unpredictable metadata in LLVM IR), is handled by X86 Backend.
   ``X86CmovConversion`` pass now respects this builtin and does not convert CMOVs to branches.
+* Add support for the ``PBNDKB`` instruction.
 
 
 Changes to the OCaml bindings


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155142.539813.patch
Type: text/x-patch
Size: 1918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230713/6c228ff0/attachment.bin>


More information about the llvm-commits mailing list