[llvm] [RISCV] Vendor Relocations for Xqci extension (PR #135400)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 09:15:34 PDT 2025
================
@@ -660,7 +698,16 @@ bool RISCVAsmBackend::addReloc(const MCFragment &F, const MCFixup &Fixup,
if (IsResolved &&
(getFixupKindInfo(Fixup.getKind()).Flags & MCFixupKindInfo::FKF_IsPCRel))
IsResolved = isPCRelFixupResolved(Target.getAddSym(), F);
- IsResolved = MCAsmBackend::addReloc(F, Fixup, Target, FixedValue, IsResolved);
+
+ if (!IsResolved) {
+ // Some Fixups require a vendor relocation, record it (directly) before we
+ // add the relocation.
+ if (std::optional<StringRef> VendorIdentifier =
----------------
MaskRay wrote:
Combine the two functions and just call sth like `maybeAddVendorReloc(F, Fixup)`
https://github.com/llvm/llvm-project/pull/135400
More information about the llvm-commits
mailing list