mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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
This commit is contained in:
@@ -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 ':'
|
||||
|
Reference in New Issue
Block a user