[compiler-rt] [llvm] [RISC-V][Zicfiss] Move shadow stack ops to save/restore builtins (PR #222850)

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 13 23:42:33 PDT 2026


nemanjai wrote:

> With regards to the actual compiler-rt implementation, I think we cannot just use the presence of zicfiss, we likely have to use a preprocessor macro relating to `fcf-protection=return` if we have one (it looks like we don't either)

FWIW, the macro I used (`__riscv_shadow_stack`) is only defined when `Opts.CFProtectionReturn` is set, which presumably is when `-fcf-protection=return` is provided on the command line.


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


More information about the llvm-commits mailing list