forked from OSchip/llvm-project
[X86] Add AMD mwaitx, monitorx, and clzero instructions to the assembly parser and disassembler.
llvm-svn: 250911
This commit is contained in:
parent
557001d1c7
commit
896c267544
|
@ -2401,6 +2401,32 @@ defm T1MSKC : tbm_binary_intr<0x01, "t1mskc", MRM7r, MRM7m>;
|
||||||
defm TZMSK : tbm_binary_intr<0x01, "tzmsk", MRM4r, MRM4m>;
|
defm TZMSK : tbm_binary_intr<0x01, "tzmsk", MRM4r, MRM4m>;
|
||||||
} // HasTBM, EFLAGS
|
} // HasTBM, EFLAGS
|
||||||
|
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
// MONITORX/MWAITX Instructions
|
||||||
|
//
|
||||||
|
let SchedRW = [WriteSystem] in {
|
||||||
|
let Uses = [EAX, ECX, EDX] in
|
||||||
|
def MONITORXrrr : I<0x01, MRM_FA, (outs), (ins), "monitorx", [],
|
||||||
|
IIC_SSE_MONITOR>, TB;
|
||||||
|
let Uses = [ECX, EAX, EBX] in
|
||||||
|
def MWAITXrr : I<0x01, MRM_FB, (outs), (ins), "mwaitx", [], IIC_SSE_MWAIT>,
|
||||||
|
TB;
|
||||||
|
} // SchedRW
|
||||||
|
|
||||||
|
def : InstAlias<"mwaitx\t{%eax, %ecx, %ebx|ebx, ecx, eax}", (MWAITXrr)>, Requires<[Not64BitMode]>;
|
||||||
|
def : InstAlias<"mwaitx\t{%rax, %rcx, %rbx|rbx, rcx, rax}", (MWAITXrr)>, Requires<[In64BitMode]>;
|
||||||
|
|
||||||
|
def : InstAlias<"monitorx\t{%eax, %ecx, %edx|edx, ecx, eax}", (MONITORXrrr)>,
|
||||||
|
Requires<[Not64BitMode]>;
|
||||||
|
def : InstAlias<"monitorx\t{%rax, %rcx, %rdx|rdx, rcx, rax}", (MONITORXrrr)>,
|
||||||
|
Requires<[In64BitMode]>;
|
||||||
|
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
// CLZERO Instruction
|
||||||
|
//
|
||||||
|
let Uses = [EAX] in
|
||||||
|
def CLZEROr : I<0x01, MRM_FC, (outs), (ins), "clzero", []>, TB;
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
// Pattern fragments to auto generate TBM instructions.
|
// Pattern fragments to auto generate TBM instructions.
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
|
@ -10742,3 +10742,23 @@ btcq $4, (%eax)
|
||||||
// CHECK: getsec
|
// CHECK: getsec
|
||||||
// CHECK: encoding: [0x0f,0x37]
|
// CHECK: encoding: [0x0f,0x37]
|
||||||
getsec
|
getsec
|
||||||
|
|
||||||
|
// CHECK: monitorx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfa]
|
||||||
|
monitorx
|
||||||
|
|
||||||
|
// CHECK: monitorx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfa]
|
||||||
|
monitorx %eax, %ecx, %edx
|
||||||
|
|
||||||
|
// CHECK: mwaitx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfb]
|
||||||
|
mwaitx
|
||||||
|
|
||||||
|
// CHECK: mwaitx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfb]
|
||||||
|
mwaitx %eax, %ecx, %ebx
|
||||||
|
|
||||||
|
// CHECK: clzero
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfc]
|
||||||
|
clzero
|
||||||
|
|
|
@ -1392,3 +1392,19 @@ vmovq %xmm0, %rax
|
||||||
// CHECK: seto 3735928559(%r10,%r9,8)
|
// CHECK: seto 3735928559(%r10,%r9,8)
|
||||||
// CHECK: encoding: [0x43,0x0f,0x90,0x84,0xca,0xef,0xbe,0xad,0xde]
|
// CHECK: encoding: [0x43,0x0f,0x90,0x84,0xca,0xef,0xbe,0xad,0xde]
|
||||||
seto 0xdeadbeef(%r10,%r9,8)
|
seto 0xdeadbeef(%r10,%r9,8)
|
||||||
|
|
||||||
|
// CHECK: monitorx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfa]
|
||||||
|
monitorx
|
||||||
|
|
||||||
|
// CHECK: monitorx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfa]
|
||||||
|
monitorx %rax, %rcx, %rdx
|
||||||
|
|
||||||
|
// CHECK: mwaitx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfb]
|
||||||
|
mwaitx
|
||||||
|
|
||||||
|
// CHECK: mwaitx
|
||||||
|
// CHECK: encoding: [0x0f,0x01,0xfb]
|
||||||
|
mwaitx %rax, %rcx, %rbx
|
||||||
|
|
Loading…
Reference in New Issue