diff options
author | Jim Grosbach <grosbach@apple.com> | 2013-02-23 00:52:09 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2013-02-23 00:52:09 +0000 |
commit | 9be2d71512f809b56cce915ee01f540d7880525e (patch) | |
tree | 025c7f7a25bd670359fee04644961800e036aaf6 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
parent | f4b7761ed72dfc2ee48fbe97836a079e52fd7596 (diff) | |
download | bcm5719-llvm-9be2d71512f809b56cce915ee01f540d7880525e.tar.gz bcm5719-llvm-9be2d71512f809b56cce915ee01f540d7880525e.zip |
ARM: Convenience aliases for 'srs*' instructions.
Handle an implied 'sp' operand.
rdar://11466783
llvm-svn: 175940
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index c95cc1b311a..6c678fdbd7b 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -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 ':'. |