[llvm] d337e09 - SystemZMCCodeEmitter: Set PCRel at fixup creation

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 4 15:26:22 PDT 2025


Author: Fangrui Song
Date: 2025-07-04T15:26:16-07:00
New Revision: d337e09e73b313ce44cdb8c634e67fd2ae7bd6a8

URL: https://github.com/llvm/llvm-project/commit/d337e09e73b313ce44cdb8c634e67fd2ae7bd6a8
DIFF: https://github.com/llvm/llvm-project/commit/d337e09e73b313ce44cdb8c634e67fd2ae7bd6a8.diff

LOG: SystemZMCCodeEmitter: Set PCRel at fixup creation

Avoid reliance on the MCAssembler::evaluateFixup workaround checking
MCFixupKindInfo::FKF_IsPCRel.

Added: 
    

Modified: 
    llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp
index e7c61e2b2f434..8db4f716c123e 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp
+++ b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCCodeEmitter.cpp
@@ -206,7 +206,7 @@ SystemZMCCodeEmitter::getPCRelEncoding(const MCInst &MI, unsigned OpNum,
       Expr = MCBinaryExpr::createAdd(Expr, OffsetExpr, Ctx, Loc);
     }
   }
-  Fixups.push_back(MCFixup::create(Offset, Expr, (MCFixupKind)Kind));
+  Fixups.push_back(MCFixup::create(Offset, Expr, Kind, true));
 
   // Output the fixup for the TLS marker if present.
   if (AllowTLS && OpNum + 1 < MI.getNumOperands()) {


        


More information about the llvm-commits mailing list