[llvm-commits] [llvm] r139014 - in /llvm/trunk: test/MC/Disassembler/X86/x86-32.txt utils/TableGen/X86RecognizableInstr.cpp
Kevin Enderby
enderby at apple.com
Fri Sep 2 11:03:03 PDT 2011
Author: enderby
Date: Fri Sep 2 13:03:03 2011
New Revision: 139014
URL: http://llvm.org/viewvc/llvm-project?rev=139014&view=rev
Log:
Fix the disassembly of the X86 "crc32w %ax, %eax" instruction. Bug 10702.
Modified:
llvm/trunk/test/MC/Disassembler/X86/x86-32.txt
llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
Modified: llvm/trunk/test/MC/Disassembler/X86/x86-32.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/x86-32.txt?rev=139014&r1=139013&r2=139014&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/x86-32.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/x86-32.txt Fri Sep 2 13:03:03 2011
@@ -27,3 +27,6 @@
# CHECK: crc32b %al, %eax
0xf2 0x0f 0x38 0xf0 0xc0
+
+# CHECK: crc32w %ax, %eax
+0x66 0xf2 0x0f 0x38 0xf1 0xc0
Modified: llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp?rev=139014&r1=139013&r2=139014&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp (original)
+++ llvm/trunk/utils/TableGen/X86RecognizableInstr.cpp Fri Sep 2 13:03:03 2011
@@ -225,7 +225,8 @@
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 @@
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;
More information about the llvm-commits
mailing list