summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-01-10 04:38:40 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-01-10 04:38:40 +0000
commit7ff05025b01e33d58cecd376d4fc9a73afe9d2a6 (patch)
tree7c91d7718ba961d0d606d67636fe1d44edb75525 /lib
parent003132d48cbb371c9bf059de4740f6d1e4142868 (diff)
downloadllvm-7ff05025b01e33d58cecd376d4fc9a73afe9d2a6.tar.gz
llvm-7ff05025b01e33d58cecd376d4fc9a73afe9d2a6.tar.bz2
llvm-7ff05025b01e33d58cecd376d4fc9a73afe9d2a6.tar.xz
ARM IAS: support #:{lower,upper}16: for GNU compatibility
The GNU assembler supports prefixing the expression with a '#' to indiciate that the value that is being moved is infact a constant. This improves the compatibility of the integrated assembler's parser for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198916 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index bebbab5327..77cdb75633 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -4813,6 +4813,10 @@ bool ARMAsmParser::parseOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands,
bool ARMAsmParser::parsePrefix(ARMMCExpr::VariantKind &RefKind) {
RefKind = ARMMCExpr::VK_ARM_None;
+ // consume an optional '#' (GNU compatibility)
+ if (getLexer().is(AsmToken::Hash))
+ Parser.Lex();
+
// :lower16: and :upper16: modifiers
assert(getLexer().is(AsmToken::Colon) && "expected a :");
Parser.Lex(); // Eat ':'