================
@@ -1813,10 +1813,17 @@ void 
SystemZInstrInfo::expandStackGuardPseudo(MachineInstr &MI,
   // Emit an appropriate pseudo for the guard type, which loads the address of
   // said guard into the scratch register AddrReg.
   if (GuardType.empty() || (GuardType == "tls")) {
-    // Emit a load of the TLS block's address
-    BuildMI(MBB, MI, DL, get(SystemZ::LOAD_TLS_BLOCK_ADDR), AddrReg);
-    // Record the appropriate stack guard offset (40 in the tls case).
-    Offset = 40;
+    if (STI.isTargetzOS()) {
+      enum { OFFSET_CEELAA_STACK_GUARD = 0x98 };
+      BuildMI(MBB, MI, DL, get(SystemZ::LOAD_LIBRARY_ANCHOR_AREA_ADDR),
+              AddrReg);
----------------
uweigand wrote:

Not sure we need the `LOAD_LIBRARY_ANCHOR_AREA_ADDR` extra step here - for the 
others, we need it because we need to use the particular sequences are issued 
exactly in order, but here we only emit a single instruction anyway ...   I 
think it would be fine just emit the `LLGT` directly here.

https://github.com/llvm/llvm-project/pull/206045
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to