]> git.ipfire.org Git - thirdparty/glibc.git/commit
riscv: Add vector registers to __SYSCALL_CLOBBERS
authorPeter Bergner <bergner@tenstorrent.com>
Wed, 3 Sep 2025 19:26:03 +0000 (14:26 -0500)
committerPeter Bergner <bergner@tenstorrent.com>
Tue, 4 Nov 2025 15:18:56 +0000 (09:18 -0600)
commit47975914fb106b83c42bc0baf6435a0944a23d30
tree1b6d64b65ada7d272e888fc09fc35515e9d617b2
parent376e336d92373bf948d1a01429b8524cc6f2a810
riscv: Add vector registers to __SYSCALL_CLOBBERS

The Linux kernel ABI specifies that the vector registers are not preserved
across system calls, but the __SYSCALL_CLOBBERS macro doesn't mention them.
This could possibly lead to compilers trying to keep data in the vector
registers across the syscall leading to corruption.  Add the vector registers
to __SYSCALL_CLOBBERS when the vector extension is enabled.  If the vector
extension is enabled, then require GCC 15 or later and RVV 1.0 or later.

Fixes: 36960f0c76 ("RISC-V: Linux Syscall Interface")
Signed-off-by: Peter Bergner <bergner@tenstorrent.com>
sysdeps/riscv/preconfigure
sysdeps/riscv/preconfigure.ac
sysdeps/unix/sysv/linux/riscv/sysdep.h