mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-21 18:29:46 +00:00
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:
parent
cf0e269d16
commit
fdd3b30151
@ -669,6 +669,11 @@ X86Operand *X86AsmParser::ParseIntelBracExpression(unsigned Size) {
|
|||||||
return ErrorOperand(End, "expected ']' token!");
|
return ErrorOperand(End, "expected ']' token!");
|
||||||
Parser.Lex();
|
Parser.Lex();
|
||||||
End = Parser.getTok().getLoc();
|
End = Parser.getTok().getLoc();
|
||||||
|
|
||||||
|
// handle [-42]
|
||||||
|
if (!BaseReg && !IndexReg)
|
||||||
|
return X86Operand::CreateMem(Disp, Start, End, Size);
|
||||||
|
|
||||||
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale,
|
return X86Operand::CreateMem(SegReg, Disp, BaseReg, IndexReg, Scale,
|
||||||
Start, End, Size);
|
Start, End, Size);
|
||||||
}
|
}
|
||||||
|
@ -34,4 +34,5 @@
|
|||||||
LBB0_3:
|
LBB0_3:
|
||||||
// CHECK: encoding: [0xeb,A]
|
// CHECK: encoding: [0xeb,A]
|
||||||
jmp LBB0_3
|
jmp LBB0_3
|
||||||
|
// CHECK: encoding: [0xf2,0x0f,0x10,0x2c,0x25,0xf8,0xff,0xff,0xff]
|
||||||
|
movsd XMM5, QWORD PTR [-8]
|
||||||
|
Loading…
Reference in New Issue
Block a user