forked from OSchip/llvm-project
Fixes disassembler crashes on 2013 Haswell RTM instructions.
rdar://13318048 llvm-svn: 176828
This commit is contained in:
parent
9534d8885f
commit
f15856ebb4
|
@ -22,7 +22,7 @@ def XBEGIN : I<0, Pseudo, (outs GR32:$dst), (ins),
|
|||
|
||||
let isBranch = 1, isTerminator = 1, Defs = [EAX] in
|
||||
def XBEGIN_4 : Ii32PCRel<0xc7, MRM_F8, (outs), (ins brtarget:$dst),
|
||||
"xbegin\t$dst", []>;
|
||||
"xbegin\t$dst", []>, Requires<[HasRTM]>;
|
||||
|
||||
def XEND : I<0x01, MRM_D5, (outs), (ins),
|
||||
"xend", [(int_x86_xend)]>, TB, Requires<[HasRTM]>;
|
||||
|
|
|
@ -103,3 +103,12 @@
|
|||
|
||||
# CHECK: adoxq (%rax), %rax
|
||||
0xf3 0x48 0x0f 0x38 0xf6 0x00
|
||||
|
||||
# CHECK: xbegin 53
|
||||
0xc7 0xf8 0x35 0x00 0x00 0x00
|
||||
|
||||
# CHECK: xend
|
||||
0x0f 0x01 0xd5
|
||||
|
||||
# CHECK: xabort $13
|
||||
0xc6 0xf8 0x0d
|
||||
|
|
|
@ -764,6 +764,17 @@ void RecognizableInstr::emitInstructionSpecifier(DisassemblerTables &tables) {
|
|||
HANDLE_OPERAND(immediate)
|
||||
HANDLE_OPERAND(immediate)
|
||||
break;
|
||||
case X86Local::MRM_F8:
|
||||
if (Opcode == 0xc6) {
|
||||
assert(numPhysicalOperands == 1 &&
|
||||
"Unexpected number of operands for X86Local::MRM_F8");
|
||||
HANDLE_OPERAND(immediate)
|
||||
} else if (Opcode == 0xc7) {
|
||||
assert(numPhysicalOperands == 1 &&
|
||||
"Unexpected number of operands for X86Local::MRM_F8");
|
||||
HANDLE_OPERAND(relocation)
|
||||
}
|
||||
break;
|
||||
case X86Local::MRMInitReg:
|
||||
// Ignored.
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue