[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

Yeting Kuo via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 14 20:27:02 PDT 2023


================
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB,
           CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; }))
     return;
 
+  const RISCVInstrInfo *TII = STI.getInstrInfo();
+  if (STI.hasFeature(RISCV::FeatureStdExtZicfiss)) {
----------------
yetingk wrote:

> Do we need an enable other than just the feature being in -march? The shadow stack pointer has to be set up when the application starts.

The hardware shadow stack support in this pr needs `-fsanitize=shadow-call-stack` now.  

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


More information about the cfe-commits mailing list