[llvm] [AVR] Emit relocation record for local branch (PR #145291)
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 19 20:48:33 PDT 2025
================
@@ -520,19 +520,7 @@ bool AVRAsmBackend::forceRelocation(const MCFragment &F, const MCFixup &Fixup,
return false;
case AVR::fixup_7_pcrel:
- case AVR::fixup_13_pcrel: {
- uint64_t Offset = Target.getConstant();
- uint64_t Size = AVRAsmBackend::getFixupKindInfo(Fixup.getKind()).TargetSize;
-
- // If the jump is too large to encode it, fall back to a relocation.
- //
- // Note that trying to actually link that relocation *would* fail, but the
- // hopes are that the module we're currently compiling won't be actually
- // linked to the final binary.
- return !adjust::adjustRelativeBranch(Size, Fixup, Offset,
- getContext().getSubtargetInfo());
- }
-
+ case AVR::fixup_13_pcrel:
----------------
benshi001 wrote:
Generally speaking, I agree to merge this PR, after some spots be fixed.
https://github.com/llvm/llvm-project/pull/145291
More information about the llvm-commits
mailing list