mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
ARM asm parsing should handle pre-indexed writeback w/o immediate.
For example, 'ldrb r9, [sp]!' is odd, but valid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140035 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d9746fe58a
commit
fb12f35545
@ -2807,6 +2807,13 @@ parseMemory(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
|
|||||||
Operands.push_back(ARMOperand::CreateMem(BaseRegNum, 0, 0, ARM_AM::no_shift,
|
Operands.push_back(ARMOperand::CreateMem(BaseRegNum, 0, 0, ARM_AM::no_shift,
|
||||||
0, false, S, E));
|
0, false, S, E));
|
||||||
|
|
||||||
|
// If there's a pre-indexing writeback marker, '!', just add it as a token
|
||||||
|
// operand. It's rather odd, but syntactically valid.
|
||||||
|
if (Parser.getTok().is(AsmToken::Exclaim)) {
|
||||||
|
Operands.push_back(ARMOperand::CreateToken("!",Parser.getTok().getLoc()));
|
||||||
|
Parser.Lex(); // Eat the '!'.
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user