[llvm] [RISCV] Add symbol parsing support for Xqcilb long branch instructions (PR #135044)

Sudharsan Veeravalli via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 20:26:35 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());
----------------
svs-quic wrote:

Thanks, I have made this change. It looks like ParseCallSymbol above has the same issue as well along with not printing any error message if we dont have `@plt`. Will look at fixing them in a separate patch.

https://github.com/llvm/llvm-project/pull/135044


More information about the llvm-commits mailing list