[llvm] [RISCV] Add symbol parsing support for Xqcilb long branch instructions (PR #135044)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 09:36:24 PDT 2025
================
@@ -2136,6 +2148,34 @@ ParseStatus RISCVAsmParser::parseCallSymbol(OperandVector &Operands) {
return ParseStatus::Success;
}
+ParseStatus RISCVAsmParser::parsePseudoQCJumpSymbol(OperandVector &Operands) {
+ SMLoc S = getLoc();
+ const MCExpr *Res;
+
+ if (getLexer().getKind() != AsmToken::Identifier)
+ return ParseStatus::NoMatch;
+ std::string Identifier(getTok().getIdentifier());
+
+ if (getLexer().peekTok().is(AsmToken::At)) {
+ Lex();
+ Lex();
+ StringRef PLT;
+ if (getParser().parseIdentifier(PLT) || PLT != "plt")
+ return ParseStatus::Failure;
+ } else {
+ Lex();
+ }
+
+ SMLoc E = SMLoc::getFromPointer(S.getPointer() + Identifier.size());
----------------
topperc wrote:
The end location should include the `@plt` if present
https://github.com/llvm/llvm-project/pull/135044
More information about the llvm-commits
mailing list