mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
ARM label operands can have an optional '#' before them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
613b757689
commit
ed6a0c5243
@ -3835,13 +3835,11 @@ bool ARMAsmParser::parseOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
if (getParser().ParseExpression(ImmVal))
|
||||
return true;
|
||||
const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ImmVal);
|
||||
if (!CE) {
|
||||
Error(S, "constant expression expected");
|
||||
return MatchOperand_ParseFail;
|
||||
if (CE) {
|
||||
int32_t Val = CE->getValue();
|
||||
if (isNegative && Val == 0)
|
||||
ImmVal = MCConstantExpr::Create(INT32_MIN, getContext());
|
||||
}
|
||||
int32_t Val = CE->getValue();
|
||||
if (isNegative && Val == 0)
|
||||
ImmVal = MCConstantExpr::Create(INT32_MIN, getContext());
|
||||
E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||
Operands.push_back(ARMOperand::CreateImm(ImmVal, S, E));
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user