aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2011-01-13 20:32:36 +0000
committerKevin Enderby <enderby@apple.com>2011-01-13 20:32:36 +0000
commit67b212e03b77e921e2b9780059681125a45d15a7 (patch)
tree8837bef7d7fc0b79c2198d60c1b8b71e7a6feb74 /lib
parentbc8d5f11e7c34e4dff86b8cbcfa5f8be70ff69dd (diff)
Fix ARMAsmParser::ParseOperand() to allow it to parse . as a branch target and
directional local labels like 1f and 2b. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 4e2f9ce41b..233599b0e7 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/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;