[llvm] [RISCV] Loosen the requirement of shadow stack codegen to Zimop (PR #152251)
Ming-Yi Lai via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 26 01:01:49 PDT 2025
================
@@ -106,8 +106,14 @@ static void emitSCSPrologue(MachineFunction &MF, MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI,
const DebugLoc &DL) {
const auto &STI = MF.getSubtarget<RISCVSubtarget>();
+ // We check Zimop instead of Zimop || Zcmop to determine whether HW shadow
+ // stack is available despite the fact that sspush/sspopchk both have a
+ // compressed form because if only Zcmop is available, we would need to
+ // reserve X5 due to c.sspopchk only takes X5 and we currently doesn't not
----------------
mylai-mtk wrote:
```suggestion
// reserve X5 due to c.sspopchk only takes X5 and we currently doesn't
```
https://github.com/llvm/llvm-project/pull/152251
More information about the llvm-commits
mailing list