mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-28 22:20:43 +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))
|
if (getParser().ParseExpression(ImmVal))
|
||||||
return true;
|
return true;
|
||||||
const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ImmVal);
|
const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ImmVal);
|
||||||
if (!CE) {
|
if (CE) {
|
||||||
Error(S, "constant expression expected");
|
int32_t Val = CE->getValue();
|
||||||
return MatchOperand_ParseFail;
|
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);
|
E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);
|
||||||
Operands.push_back(ARMOperand::CreateImm(ImmVal, S, E));
|
Operands.push_back(ARMOperand::CreateImm(ImmVal, S, E));
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user