From: Jeff Law Date: Sun, 4 Jan 2026 19:12:21 +0000 (-0700) Subject: Partially revert patch that made VXRM a global register on RISC-V X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08ccc67ef44b4ddea72ea50d465d38b87414ecce;p=thirdparty%2Fgcc.git Partially revert patch that made VXRM a global register on RISC-V This is something that fell through the cracks in gcc-15. VXRM isn't heavily used, so errors in this space could easily be going unnoticed right now. Essentially we made VXRM a global register a while back, it was done somewhat speculatively as we didn't have a case where it really mattered. Richard S. then argued the patch was wrong and I agreed with him, but never got around to reverting the hunk in question. So that's what I'm finally doing here. Note that I kept the tests from the patch which made VXRM a global. Those should continue to work. Bootstrapped and regression tested on a BPI & Pioneer system and checked on riscv{32,64}-elf as well. gcc/ * config/riscv/riscv.cc (riscv_conditional_register_usage): Revert patch that made VXRM a global register. --- diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 8ee7861ad58..40705e079c7 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -12582,9 +12582,7 @@ riscv_conditional_register_usage (void) call_used_regs[regno] = 1; } - if (TARGET_VECTOR) - global_regs[VXRM_REGNUM] = 1; - else + if (!TARGET_VECTOR) { for (int regno = V_REG_FIRST; regno <= V_REG_LAST; regno++) fixed_regs[regno] = call_used_regs[regno] = 1;