diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2024-11-08 16:49:34 -0500 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2024-11-08 16:49:34 -0500 |
commit | 3a1da8ffb71af1005c5a035d0eb5f956056adf32 (patch) | |
tree | 00afdbdf6b12702b2a654c7dae8e7876c6e67af7 /gcc | |
parent | 1ea45291af0bc8f7b6dff67a0f23be662b2f9908 (diff) | |
download | gcc-3a1da8ffb71af1005c5a035d0eb5f956056adf32.zip gcc-3a1da8ffb71af1005c5a035d0eb5f956056adf32.tar.gz gcc-3a1da8ffb71af1005c5a035d0eb5f956056adf32.tar.bz2 |
hppa: Don't allow large modes in hard registers
LRA has problems handling spills for OI and TI modes. There are
issues with SUBREG support as well.
This change fixes gcc.c-torture/compile/pr92618.c with LRA.
2024-11-08 John David Anglin <danglin@gcc.gnu.org>
gcc/ChangeLog:
PR target/117238
* config/pa/pa32-regs.h (PA_HARD_REGNO_MODE_OK): Don't allow
mode size 32. Limit mode size 16 in general registers to
complex modes.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/pa/pa32-regs.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/config/pa/pa32-regs.h b/gcc/config/pa/pa32-regs.h index 3467e03..c9a27ef 100644 --- a/gcc/config/pa/pa32-regs.h +++ b/gcc/config/pa/pa32-regs.h @@ -187,10 +187,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see that includes the incoming arguments and the return value. We specify a set with no overlaps so that we don't have to specify that the destination register is an early clobber in patterns using this mode. Except for the - return value, the starting registers are odd. For 128 and 256 bit modes, - we similarly specify non-overlapping sets of cpu registers. However, - there aren't any patterns defined for modes larger than 64 bits at the - moment. + return value, the starting registers are odd. Except for complex modes, + we don't allow modes larger than 64 bits in the general registers as there + are issues with copies, spills and SUBREG support. We limit the modes allowed in the floating point registers to the set of modes used in the machine definition. In addition, we allow @@ -217,15 +216,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ? (VALID_FP_MODE_P (MODE) \ && (GET_MODE_SIZE (MODE) <= 4 \ || (GET_MODE_SIZE (MODE) == 8 && ((REGNO) & 1) == 0) \ - || (GET_MODE_SIZE (MODE) == 16 && ((REGNO) & 3) == 0) \ - || (GET_MODE_SIZE (MODE) == 32 && ((REGNO) & 7) == 0))) \ + || (GET_MODE_SIZE (MODE) == 16 && ((REGNO) & 3) == 0))) \ : (GET_MODE_SIZE (MODE) <= UNITS_PER_WORD \ || (GET_MODE_SIZE (MODE) == 2 * UNITS_PER_WORD \ && ((((REGNO) & 1) == 1 && (REGNO) <= 25) || (REGNO) == 28)) \ || (GET_MODE_SIZE (MODE) == 4 * UNITS_PER_WORD \ - && ((REGNO) & 3) == 3 && (REGNO) <= 23) \ - || (GET_MODE_SIZE (MODE) == 8 * UNITS_PER_WORD \ - && ((REGNO) & 7) == 3 && (REGNO) <= 19))) + && COMPLEX_MODE_P (MODE) \ + && ((REGNO) & 3) == 3 && (REGNO) <= 23))) /* How to renumber registers for gdb. |