public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/work165-test)] Limit SPR registers to hold only small integer modes.
@ 2024-05-09 18:48 Michael Meissner
0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2024-05-09 18:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:dbb0bf3c552de9cfb09cd52c4136ffcca044e56b
commit dbb0bf3c552de9cfb09cd52c4136ffcca044e56b
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu May 9 14:48:20 2024 -0400
Limit SPR registers to hold only small integer modes.
2024-05-08 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.cc (rs6000_hard_regno_mode_ok_uncached): Limit
SPR registers to only hold only small integer modes.
Diff:
---
gcc/config/rs6000/rs6000.cc | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 6bfcfdfb22c5..9f9f942a7860 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -1930,8 +1930,11 @@ rs6000_hard_regno_mode_ok_uncached (int regno, machine_mode mode)
if (CR_REGNO_P (regno))
return GET_MODE_CLASS (mode) == MODE_CC;
+ if (CA_REGNO_P (regno))
+ return mode == Pmode || mode == SImode;
+
/* Limit SPR registers to integer modes that can fit in a single register.
- Do not allow complex modes or modes that need sign/zero extension. */
+ Do not allow complex modes. */
switch (regno)
{
case LR_REGNO:
@@ -1939,8 +1942,10 @@ rs6000_hard_regno_mode_ok_uncached (int regno, machine_mode mode)
case TAR_REGNO:
case VRSAVE_REGNO:
case VSCR_REGNO:
- case CA_REGNO:
- return (orig_mode == Pmode || orig_mode == SImode);
+ return (orig_mode == Pmode
+ || orig_mode == SImode
+ || orig_mode == HImode
+ || orig_mode == QImode);
default:
break;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-09 18:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-09 18:48 [gcc(refs/users/meissner/heads/work165-test)] Limit SPR registers to hold only small integer modes Michael Meissner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).