X86Disassembler - fixed a bug in immediate print

llvm-svn: 206953
This commit is contained in:
Elena Demikhovsky 2014-04-23 07:21:04 +00:00
parent 70097dbad7
commit a8292268f5
2 changed files with 5 additions and 1 deletions

View File

@ -319,7 +319,7 @@ static void translateImmediate(MCInst &mcInst, uint64_t immediate,
}
// 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:

View File

@ -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