llvm.org GIT mirror llvm / 12dccae
Fixes disassembler crashes on 2013 Haswell RTM instructions. rdar://13318048 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176828 91177308-0d34-0410-b5e6-96231b3b80d8 Kevin Enderby 7 years ago
3 changed file(s) with 21 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
2121
2222 let isBranch = 1, isTerminator = 1, Defs = [EAX] in
2323 def XBEGIN_4 : Ii32PCRel<0xc7, MRM_F8, (outs), (ins brtarget:$dst),
24 "xbegin\t$dst", []>;
24 "xbegin\t$dst", []>, Requires<[HasRTM]>;
2525
2626 def XEND : I<0x01, MRM_D5, (outs), (ins),
2727 "xend", [(int_x86_xend)]>, TB, Requires<[HasRTM]>;
102102
103103 # CHECK: adoxq (%rax), %rax
104104 0xf3 0x48 0x0f 0x38 0xf6 0x00
105
106 # CHECK: xbegin 53
107 0xc7 0xf8 0x35 0x00 0x00 0x00
108
109 # CHECK: xend
110 0x0f 0x01 0xd5
111
112 # CHECK: xabort $13
113 0xc6 0xf8 0x0d
763763 HANDLE_OPERAND(immediate)
764764 HANDLE_OPERAND(immediate)
765765 break;
766 case X86Local::MRM_F8:
767 if (Opcode == 0xc6) {
768 assert(numPhysicalOperands == 1 &&
769 "Unexpected number of operands for X86Local::MRM_F8");
770 HANDLE_OPERAND(immediate)
771 } else if (Opcode == 0xc7) {
772 assert(numPhysicalOperands == 1 &&
773 "Unexpected number of operands for X86Local::MRM_F8");
774 HANDLE_OPERAND(relocation)
775 }
776 break;
766777 case X86Local::MRMInitReg:
767778 // Ignored.
768779 break;