mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
ARM: Convenience aliases for 'srs*' instructions.
Handle an implied 'sp' operand. rdar://11466783 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4625,6 +4625,15 @@ bool ARMAsmParser::parseOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
}
|
||||
E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||
Operands.push_back(ARMOperand::CreateImm(ImmVal, S, E));
|
||||
|
||||
// There can be a trailing '!' on operands that we want as a separate
|
||||
// '!' Token operand. Handle that here. For example, the compatibilty
|
||||
// alias for 'srsdb sp!, #imm' is 'srsdb #imm!'.
|
||||
if (Parser.getTok().is(AsmToken::Exclaim)) {
|
||||
Operands.push_back(ARMOperand::CreateToken(Parser.getTok().getString(),
|
||||
Parser.getTok().getLoc()));
|
||||
Parser.Lex(); // Eat exclaim token
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// w/ a ':' after the '#', it's just like a plain ':'.
|
||||
|
Reference in New Issue
Block a user