Skip to content

Commit 3ee58e2

Browse files
committed
[X86] Add WRMSRNS instructions.
For more details about these instructions, 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 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D135935
1 parent 7a4e56a commit 3ee58e2

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

llvm/docs/ReleaseNotes.rst

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ Changes to the X86 Backend
137137
--------------------------
138138

139139
* Add support for the ``RDMSRLIST and WRMSRLIST`` instructions.
140+
* Add support for the ``WRMSRNS`` instruction.
140141

141142
Changes to the OCaml bindings
142143
-----------------------------

llvm/lib/Target/X86/X86InstrSystem.td

+2
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ def LLDT16m : I<0x00, MRM2m, (outs), (ins i16mem:$src),
425425
let SchedRW = [WriteSystem] in {
426426
let Uses = [EAX, ECX, EDX] in
427427
def WRMSR : I<0x30, RawFrm, (outs), (ins), "wrmsr", []>, TB;
428+
let Uses = [EAX, ECX, EDX] in
429+
def WRMSRNS : I<0x01, MRM_C6, (outs), (ins), "wrmsrns", []>, PS;
428430
let Defs = [EAX, EDX], Uses = [ECX] in
429431
def RDMSR : I<0x32, RawFrm, (outs), (ins), "rdmsr", []>, TB;
430432

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# RUN: llvm-mc --disassemble %s -triple=x86_64 | FileCheck %s --check-prefixes=ATT
2+
# RUN: llvm-mc --disassemble %s -triple=x86_64 -x86-asm-syntax=intel --output-asm-variant=1 | FileCheck %s --check-prefixes=INTEL
3+
# RUN: llvm-mc --disassemble %s -triple=i386 | FileCheck %s --check-prefixes=ATT
4+
# RUN: llvm-mc --disassemble %s -triple=i386 -x86-asm-syntax=intel --output-asm-variant=1 | FileCheck %s --check-prefixes=INTEL
5+
6+
# ATT: wrmsrns
7+
# INTEL: wrmsrns
8+
0x0f,0x01,0xc6

llvm/test/MC/X86/wrmsrns.s

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// RUN: llvm-mc -triple x86_64 --show-encoding %s | FileCheck %s
2+
// RUN: llvm-mc -triple x86_64 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
3+
// RUN: llvm-mc -triple i386 --show-encoding %s | FileCheck %s
4+
// RUN: llvm-mc -triple i386 -x86-asm-syntax=intel -output-asm-variant=1 --show-encoding %s | FileCheck %s
5+
6+
// CHECK: wrmsrns
7+
// CHECK: encoding: [0x0f,0x01,0xc6]
8+
wrmsrns

0 commit comments

Comments
 (0)