[llvm] r206953 - X86Disassembler - fixed a bug in immediate print
Elena Demikhovsky
elena.demikhovsky at intel.com
Wed Apr 23 00:21:04 PDT 2014
Author: delena
Date: Wed Apr 23 02:21:04 2014
New Revision: 206953
URL: http://llvm.org/viewvc/llvm-project?rev=206953&view=rev
Log:
X86Disassembler - fixed a bug in immediate print
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
llvm/trunk/test/MC/Disassembler/X86/prefixes.txt
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp?rev=206953&r1=206952&r2=206953&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86Disassembler.cpp Wed Apr 23 02:21:04 2014
@@ -319,7 +319,7 @@ static void translateImmediate(MCInst &m
}
// By default sign-extend all X86 immediates based on their encoding.
else if (type == TYPE_IMM8 || type == TYPE_IMM16 || type == TYPE_IMM32 ||
- type == TYPE_IMM64) {
+ type == TYPE_IMM64 || type == TYPE_IMMv) {
uint32_t Opcode = mcInst.getOpcode();
switch (operand.encoding) {
default:
Modified: llvm/trunk/test/MC/Disassembler/X86/prefixes.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/prefixes.txt?rev=206953&r1=206952&r2=206953&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/prefixes.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/prefixes.txt Wed Apr 23 02:21:04 2014
@@ -44,6 +44,10 @@
# CHECK-NEXT: nop
0xf0 0x90
+# Test that immediate is printed correctly within opsize prefix
+# CHECK: addw $-12, %ax
+0x66,0x83,0xc0,0xf4
+
# Test that multiple redundant prefixes work (redundant, but valid x86).
# CHECK: rep
# CHECK-NEXT: rep
More information about the llvm-commits
mailing list