diff options
author | Kevin Enderby <enderby@apple.com> | 2011-01-13 20:32:36 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2011-01-13 20:32:36 +0000 |
commit | b084be90e8ae5e77d1d8e06e4d0cfc79b7db236d (patch) | |
tree | 451c6c89480c1e25d60fc76a390e50ec3e9c32a1 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
parent | 250362683828a38418f087b6fbcfa8ae560f5977 (diff) | |
download | bcm5719-llvm-b084be90e8ae5e77d1d8e06e4d0cfc79b7db236d.tar.gz bcm5719-llvm-b084be90e8ae5e77d1d8e06e4d0cfc79b7db236d.zip |
Fix ARMAsmParser::ParseOperand() to allow it to parse . as a branch target and
directional local labels like 1f and 2b.
llvm-svn: 123393
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 4e2f9ce41b8..233599b0e73 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -840,10 +840,12 @@ bool ARMAsmParser::ParseOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands){ default: Error(Parser.getTok().getLoc(), "unexpected token in operand"); return true; - case AsmToken::Identifier: { + case AsmToken::Identifier: if (!TryParseRegisterWithWriteBack(Operands)) return false; - + // Fall though for the Identifier case that is not a register + case AsmToken::Integer: // things like 1f and 2b as a branch targets + case AsmToken::Dot: { // . as a branch target // This was not a register so parse other operands that start with an // identifier (like labels) as expressions and create them as immediates. const MCExpr *IdVal; |