[llvm-commits] [llvm] r123393 - /llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Kevin Enderby
enderby at apple.com
Thu Jan 13 12:32:36 PST 2011
Author: enderby
Date: Thu Jan 13 14:32:36 2011
New Revision: 123393
URL: http://llvm.org/viewvc/llvm-project?rev=123393&view=rev
Log:
Fix ARMAsmParser::ParseOperand() to allow it to parse . as a branch target and
directional local labels like 1f and 2b.
Modified:
llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=123393&r1=123392&r2=123393&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Thu Jan 13 14:32:36 2011
@@ -840,10 +840,12 @@
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;
More information about the llvm-commits
mailing list