]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Partially revert patch that made VXRM a global register on RISC-V
authorJeff Law <jeffrey.law@oss.qualcomm.com>
Sun, 4 Jan 2026 19:12:21 +0000 (12:12 -0700)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Sun, 4 Jan 2026 19:12:21 +0000 (12:12 -0700)
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.

gcc/config/riscv/riscv.cc

index 8ee7861ad584cd7110656e577417a861e0f9e72c..40705e079c754aac8dbe316ebf39ff0ceb66357b 100644 (file)
@@ -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;