[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)
Sam Elliott via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 27 18:01:00 PDT 2025
================
@@ -2233,8 +2235,17 @@ ParseStatus RISCVAsmParser::parseOperandWithSpecifier(OperandVector &Operands) {
SMLoc S = getLoc();
SMLoc E;
- if (!parseOptionalToken(AsmToken::Percent) ||
- getLexer().getKind() != AsmToken::Identifier)
+ if (!parseOptionalToken(AsmToken::Percent))
+ return Error(getLoc(), "expected '%' relocation specifier");
+ const MCExpr *Expr = nullptr;
+ bool Failed = parseExprWithSpecifier(Expr, E);
+ if (!Failed)
+ Operands.push_back(RISCVOperand::createImm(Expr, S, E, isRV64()));
+ return Failed;
+}
+
+bool RISCVAsmParser::parseExprWithSpecifier(const MCExpr *&Res, SMLoc &E) {
----------------
lenary wrote:
Would be great to move these all to ParseStatus, but this PR isn't the right moment.
https://github.com/llvm/llvm-project/pull/132569
More information about the llvm-branch-commits
mailing list