On 7/30/24 2:50 PM, Raphael Zinsly wrote:
On Tue, Jul 30, 2024 at 4:29 PM Jeff Law <jeffreya...@gmail.com> 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".  That can't be what we want :-)

Sorry I misunderstood your initial question.
Figured we weren't on the same page with that :-)

Yes I am using s1 as a copy of the stack pointer and the new CFA.
It's only being used in a "mov s1,sp".
But s1 is a call saved register. So you can't overwrite it like that without having first saved it. I'm guessing we can't use t2 because it's the static chain. So what about t3? (GP_TEMP_FIRST+3)

It's not great, but it's better than s1 I think.

Jeff

Reply via email to