On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote:
Add the TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE to riscv in
order to enable stack clash protection when using alloca.
The code and tests are the same used by aarch64.

gcc/ChangeLog:
        * config/riscv/riscv.cc (riscv_compute_frame_info): Update
          outgoing args size.
          (riscv_stack_clash_protection_alloca_probe_range): New.
          (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
        * config/riscv/riscv.h
          (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS): New.
          (STACK_DYNAMIC_OFFSET): New.
Thanks for adding this. I don't offhand remember if I originally noticed the lack of ALLOCA_PROBE_RANGE during review or as a result of the initial package testing that started before the milkv blew up where the unhandled cases very much looked alloca related. Either way, needed fixing and thanks for taking care of it.

This looks good. So the only outstanding question is that one for prologue temporaries in patch 4/5.

Jeff


Reply via email to