[llvm] MCAsmBackend::applyFixup: Change `Data` to indicate the relocated location (PR #151724)

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 1 13:10:28 PDT 2025


================
@@ -173,7 +171,7 @@ void SystemZMCAsmBackend::applyFixup(const MCFragment &F, const MCFixup &Fixup,
     Value &= ((uint64_t)1 << BitSize) - 1;
   unsigned ShiftValue = (Size * 8) - 8;
   for (unsigned I = 0; I != Size; ++I) {
-    Data[Offset + I] |= uint8_t(Value >> ShiftValue);
+    Data[I] |= uint8_t(Value >> ShiftValue);
----------------
uweigand wrote:

It seems quite weird for this routine (a few lines above this) to compute `Offset` and assert on it being within a certain range, but then to never actually use it.  If common code handles the fixup offset, it should do so completely ...

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


More information about the llvm-commits mailing list