Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/ARM/AsmParser/ARMAsmParser.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 5,447 Lines • ▼ Show 20 Lines | case AsmToken::Equal: { | ||||
S = Parser.getTok().getLoc(); | S = Parser.getTok().getLoc(); | ||||
if (Mnemonic != "ldr") // only parse for ldr pseudo (e.g. ldr r0, =val) | if (Mnemonic != "ldr") // only parse for ldr pseudo (e.g. ldr r0, =val) | ||||
return Error(S, "unexpected token in operand"); | return Error(S, "unexpected token in operand"); | ||||
Parser.Lex(); // Eat '=' | Parser.Lex(); // Eat '=' | ||||
const MCExpr *SubExprVal; | const MCExpr *SubExprVal; | ||||
if (getParser().parseExpression(SubExprVal)) | if (getParser().parseExpression(SubExprVal)) | ||||
return true; | return true; | ||||
E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); | E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1); | ||||
// execute-only: we assume that assembly programmers know what they are | |||||
// doing and allow literal pool creation here | |||||
Operands.push_back(ARMOperand::CreateConstantPoolImm(SubExprVal, S, E)); | Operands.push_back(ARMOperand::CreateConstantPoolImm(SubExprVal, S, E)); | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
// parsePrefix - Parse ARM 16-bit relocations expression prefix, i.e. | // parsePrefix - Parse ARM 16-bit relocations expression prefix, i.e. | ||||
// :lower16: and :upper16:. | // :lower16: and :upper16:. | ||||
▲ Show 20 Lines • Show All 4,886 Lines • Show Last 20 Lines |