[llvm] [AVR] Fix parsing & emitting relative jumps  (PR #102936)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Aug 26 05:21:22 PDT 2024
    
    
  
aykevl wrote:
This small patch also gets all my AVR tests to pass:
```diff
--- a/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
+++ b/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.cpp
@@ -516,12 +516,6 @@ bool AVRAsmBackend::shouldForceRelocation(const MCAssembler &Asm,
   // 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;
-    [[fallthrough]];
   case AVR::fixup_call:
     return true;
   }
```
https://github.com/llvm/llvm-project/pull/102936
    
    
More information about the llvm-commits
mailing list