PR 44364, e500 caller-save slots
Alan Modra
amodra@gmail.com
Thu Jun 10 03:37:00 GMT 2010
e500 can use 64-bit gprs for fp calculations, but the normal size of
gprs for integer calculations is 32-bit. This confuses gcc's
caller-save logic, resulting in only the low 32 bits being saved even
when the full 64-bit register is in use. Fixed as follows, but this
tickles a bug in caller-save.c. See
http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01033.html
OK to apply assuming bootstrap/regress test passes?
PR target/44364
* config/rs6000/e500.h (HARD_REGNO_CALLER_SAVE_MODE): Define.
Index: gcc/config/rs6000/e500.h
===================================================================
--- gcc/config/rs6000/e500.h (revision 160245)
+++ gcc/config/rs6000/e500.h (working copy)
@@ -43,3 +43,10 @@
error ("E500 and FPRs not supported"); \
} \
} while (0)
+
+/* When setting up caller-save slots (MODE == VOIDmode) ensure we
+ allocate space for DFmode. Save gprs in the correct mode too. */
+#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
+ (TARGET_E500_DOUBLE && ((MODE) == VOIDmode || (MODE) == DFmode) \
+ ? DFmode \
+ : choose_hard_reg_mode ((REGNO), (NREGS), false))
--
Alan Modra
Australia Development Lab, IBM
More information about the Gcc-patches
mailing list