Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-30 Thread Jeff Law
On 7/30/24 2:50 PM, Raphael Zinsly wrote: On Tue, Jul 30, 2024 at 4:29 PM Jeff Law wrote: ... You define: +#define RISCV_STACK_CLASH_VECTOR_CFA_REGNUM (GP_TEMP_FIRST + 4) Where: #define GP_REG_FIRST 0 #define GP_TEMP_FIRST (GP_REG_FIRST + 5) So RISCV_STACK_CLASH_VECTOR_CFA_REGNUM defined a

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-30 Thread Raphael Zinsly
On Tue, Jul 30, 2024 at 4:29 PM Jeff Law wrote: >... > You define: > +#define RISCV_STACK_CLASH_VECTOR_CFA_REGNUM (GP_TEMP_FIRST + 4) > > Where: > #define GP_REG_FIRST 0 > #define GP_TEMP_FIRST (GP_REG_FIRST + 5) > > So RISCV_STACK_CLASH_VECTOR_CFA_REGNUM defined as "9" which I think is > "s1". T

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-30 Thread Jeff Law
On 7/29/24 8:52 AM, Raphael Zinsly wrote: On Mon, Jul 29, 2024 at 11:20 AM Jeff Law wrote: On 7/29/24 6:18 AM, Raphael Zinsly wrote: On Fri, Jul 26, 2024 at 6:48 PM Jeff Law wrote: On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: Adds basic support to vector stack-clash protectio

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-29 Thread Raphael Zinsly
On Mon, Jul 29, 2024 at 11:20 AM Jeff Law wrote: > > > > On 7/29/24 6:18 AM, Raphael Zinsly wrote: > > On Fri, Jul 26, 2024 at 6:48 PM Jeff Law wrote: > >> > >> > >> > >> On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: > >>> Adds basic support to vector stack-clash protection using a loop to d

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-29 Thread Jeff Law
On 7/29/24 6:18 AM, Raphael Zinsly wrote: On Fri, Jul 26, 2024 at 6:48 PM Jeff Law wrote: On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: Adds basic support to vector stack-clash protection using a loop to do the probing and stack adjustments. gcc/ChangeLog: * config/riscv/ris

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-29 Thread Raphael Zinsly
On Fri, Jul 26, 2024 at 6:48 PM Jeff Law wrote: > > > > On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: > > Adds basic support to vector stack-clash protection using a loop to do > > the probing and stack adjustments. > > > > gcc/ChangeLog: > > * config/riscv/riscv.cc > > (riscv_all

Re: [PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-26 Thread Jeff Law
On 7/24/24 12:00 PM, Raphael Moreira Zinsly wrote: Adds basic support to vector stack-clash protection using a loop to do the probing and stack adjustments. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_allocate_and_probe_stack_loop): New function. (riscv_v_adjust_scal

[PATCH 4/5] RISC-V: Add support to vector stack-clash protection

2024-07-24 Thread Raphael Moreira Zinsly
Adds basic support to vector stack-clash protection using a loop to do the probing and stack adjustments. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_allocate_and_probe_stack_loop): New function. (riscv_v_adjust_scalable_frame): Add stack-clash protection support.