[llvm] [AVR] Fix parsing & emitting relative jumps (PR #102936)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 26 05:53:48 PDT 2024
================
@@ -513,14 +516,10 @@ bool AVRAsmBackend::shouldForceRelocation(const MCAssembler &Asm,
switch ((unsigned)Fixup.getKind()) {
default:
return Fixup.getKind() >= FirstLiteralRelocationKind;
- // Fixups which should always be recorded as relocations.
case AVR::fixup_7_pcrel:
case AVR::fixup_13_pcrel:
- // Do not force relocation for PC relative branch like 'rjmp .',
- // 'rcall . - off' and 'breq . + off'.
- if (const auto *SymA = Target.getSymA())
- if (SymA->getSymbol().getName().size() == 0)
- return false;
+ // Always resolve relocations for PC-relative branches
+ return false;
[[fallthrough]];
----------------
aykevl wrote:
```suggestion
```
This fallthrough doesn't do anything anymore, so can be removed.
https://github.com/llvm/llvm-project/pull/102936
More information about the llvm-commits
mailing list