[llvm] [aarch64] XOR the frame pointer with the stack cookie when protecting the stack (PR #161114)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 15 20:56:55 PDT 2025
================
@@ -2275,6 +2275,14 @@ bool AArch64InstrInfo::expandPostRAPseudo(MachineInstr &MI) const {
.addGlobalAddress(GV, 0, LoFlags)
.addMemOperand(*MI.memoperands_begin());
}
+ if (Subtarget.getTargetTriple().isOSMSVCRT() &&
+ !Subtarget.getTargetLowering()
+ ->getTargetMachine()
+ .Options.EnableGlobalISel) {
----------------
efriedma-quic wrote:
Do we need the EnableGlobalISel check here?
Probably needs a comment explaining why we're doing this specifically for for MSVCRT targets (to match MSVC).
Can we move this outside the if statement, so it doesn't depend on the code model? We should usually be using small code model for Windows targets, due to the inherent limits of PE-COFF, but some unusual configs like JITs can use other code models.
https://github.com/llvm/llvm-project/pull/161114
More information about the llvm-commits
mailing list