1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Fix the disassembly of the X86 "crc32w %ax, %eax" instruction. Bug 10702.

llvm-svn: 139014
This commit is contained in:
Kevin Enderby 2011-09-02 18:03:03 +00:00
parent 32cf633f1c
commit edfcba2f3c
2 changed files with 8 additions and 2 deletions

View File

@ -27,3 +27,6 @@
# CHECK: crc32b %al, %eax
0xf2 0x0f 0x38 0xf0 0xc0
# CHECK: crc32w %ax, %eax
0x66 0xf2 0x0f 0x38 0xf1 0xc0

View File

@ -225,7 +225,8 @@ RecognizableInstr::RecognizableInstr(DisassemblerTables &tables,
Operands = &insn.Operands.OperandList;
IsSSE = HasOpSizePrefix && (Name.find("16") == Name.npos);
IsSSE = (HasOpSizePrefix && (Name.find("16") == Name.npos)) ||
(Name.find("CRC32") != Name.npos);
HasFROperands = hasFROperands();
HasVEX_LPrefix = has256BitOperands() || Rec->getValueAsBit("hasVEX_L");
@ -318,7 +319,9 @@ InstructionContext RecognizableInstr::insnContext() const {
else
insnContext = IC_64BIT;
} else {
if (HasOpSizePrefix)
if (HasOpSizePrefix && Prefix == X86Local::TF)
insnContext = IC_XD;
else if (HasOpSizePrefix)
insnContext = IC_OPSIZE;
else if (Prefix == X86Local::XD)
insnContext = IC_XD;