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 | 1e8ed2537b3e4b2175cd9e62626f07606c62cfa0 (patch) | |
tree | d5e144e5936bfe715ced92bcb81f634ac3313ca4 /lib/Target/ARM/AsmParser | |
parent | 3603e9aa5e46923c44db1e6254f0393a2b0644e4 (diff) | |
download | external_llvm-1e8ed2537b3e4b2175cd9e62626f07606c62cfa0.zip external_llvm-1e8ed2537b3e4b2175cd9e62626f07606c62cfa0.tar.gz external_llvm-1e8ed2537b3e4b2175cd9e62626f07606c62cfa0.tar.bz2 |
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
Diffstat (limited to 'lib/Target/ARM/AsmParser')
-rw-r--r-- | lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index c95cc1b..6c678fd 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/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 ':'. |