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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148570 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2012-01-20 21:21:01 +00:00
parent cf0e269d16
commit fdd3b30151
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]