public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/meissner/heads/ieee)] Fix stdarg-3 regression on xstormy16 port
@ 2020-04-16 22:52 Michael Meissner
  0 siblings, 0 replies; only message in thread
From: Michael Meissner @ 2020-04-16 22:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7f26e60c2600f0a676fc9370390ebf0a3c78f31c

commit 7f26e60c2600f0a676fc9370390ebf0a3c78f31c
Author: Jeff Law <law@redhat.com>
Date:   Fri Apr 3 17:47:18 2020 -0600

    Fix stdarg-3 regression on xstormy16 port
    
            PR rtl-optimization/92264
            * config/stormy16/stormy16.c (xstormy16_preferred_reload_class): Handle
            reloading of auto-increment addressing modes.

Diff:
---
 gcc/ChangeLog                  |  6 ++++++
 gcc/config/stormy16/stormy16.c | 12 +++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6317e385cac..25d1c5d1c38 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-03  Jeff Law  <law@redhat.com>
+
+	PR rtl-optimization/92264
+	* config/stormy16/stormy16.c (xstormy16_preferred_reload_class): Handle
+	reloading of auto-increment addressing modes.
+
 2020-04-03  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR target/94467
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 55fe82954c1..2141531e262 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -497,7 +497,17 @@ xstormy16_secondary_reload_class (enum reg_class rclass,
 static reg_class_t
 xstormy16_preferred_reload_class (rtx x, reg_class_t rclass)
 {
-  if (rclass == GENERAL_REGS && MEM_P (x))
+  /* Only the first eight registers can be moved to/from memory.
+     So those prefer EIGHT_REGS.
+
+     Similarly reloading an auto-increment address is going to
+     require loads and stores, so we must use EIGHT_REGS for those
+     too.  */
+  if (rclass == GENERAL_REGS
+      && (MEM_P (x)
+	  || GET_CODE (x) == POST_INC
+	  || GET_CODE (x) == PRE_DEC
+	  || GET_CODE (x) == PRE_MODIFY))
     return EIGHT_REGS;
 
   return rclass;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-16 22:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-16 22:52 [gcc(refs/users/meissner/heads/ieee)] Fix stdarg-3 regression on xstormy16 port 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).