Intel syntax: Parse ... PTR [-8]

llvm-svn: 148570
This commit is contained in:
Devang Patel 2012-01-20 21:21:01 +00:00
parent f36613cb45
commit d0930fff85
2 changed files with 7 additions and 1 deletions

View File

@ -669,6 +669,11 @@ X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned Size) {
return ErrorOperand(End, "expected ']' token!");
Parser.Lex();
End = Parser.getTok().getLoc();
// handle [-42]
if (!BaseReg && !IndexReg)
return X86Operand::CreateMem(Disp, Start, End, Size);
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale,
Start, End, Size);
}

View File

@ -34,4 +34,5 @@
LBB0_3:
// CHECK: encoding: [0xeb,A]
jmp LBB0_3
// CHECK: encoding: [0xf2,0x0f,0x10,0x2c,0x25,0xf8,0xff,0xff,0xff]
movsd XMM5, QWORD PTR [-8]