]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Small stack tie changes
authorRaphael Moreira Zinsly <rzinsly@ventanamicro.com>
Mon, 22 Jul 2024 14:23:12 +0000 (11:23 -0300)
committerRaphael Moreira Zinsly <rzinsly@ventanamicro.com>
Fri, 9 Aug 2024 13:42:36 +0000 (10:42 -0300)
commit0e604d0ef6dcac8ee4cdc62902f2a2708ef7b040
tree69b5c0c0a62141fb3583854abac720463dd36917
parentf91f7201ac0ab6805b517341c0ba7a0c48b7971c
RISC-V: Small stack tie changes

Enable the register used by riscv_emit_stack_tie () to be passed as
an argument so we can tie the stack with other registers besides
hard_frame_pointer_rtx.
Also don't allow operand 1 of stack_tie<mode> to be optimized to sp
in preparation for the stack clash protection support.

gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_emit_stack_tie): Pass the
register to be tied to the stack pointer as argument.
* config/riscv/riscv.md (stack_tie<mode>): Don't match equal
operands.
gcc/config/riscv/riscv.cc
gcc/config/riscv/riscv.md