[llvm] [RISCV] Add initial assembler/MC layer support for big-endian (PR #146534)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 5 09:11:34 PDT 2025


================
@@ -892,8 +929,11 @@ void RISCVAsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup,
 
   // For each byte of the fragment that the fixup touches, mask in the
   // bits from the fixup value.
+  // For big endian cores, data fixup should be swapped.
+  bool SwapValue = (Endian == llvm::endianness::big) && isDataFixup(Kind);
----------------
jrtc27 wrote:

```suggestion
  bool SwapValue = Endian == llvm::endianness::big && isDataFixup(Kind);
```

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


More information about the llvm-commits mailing list