On 6/27/25 12:48 AM, Alexey Merzlyakov wrote:
Fixes incorrect SP-addresses used in CFA notes for the stack probes
unrelative to the frame's top. It applied to the RISC-V targets code
generation when the stack-clash protection is enabled.
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_allocate_and_probe_stack_space):
Fix SP-addresses in REG_CFA_DEF_CFA notes for stack-clash case.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/pr120714.c: New test.
Raphael and I sync'd on these issues this morning. Raphael has
indicated Alexey's patch is better as it handles residuals correctly.
So I've pushed this patch.
Thanks Alexey!
jeff