This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[3.3/mainline] PR target/9929
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: mark at codesourcery dot com, rth at redhat dot com, dave dot anglin at nrc dot ca,gcc-patches at gcc dot gnu dot org
- Date: Sun, 27 Jul 2003 21:32:36 +0200
- Subject: [3.3/mainline] PR target/9929
Hi,
this is the long promised bugfix. The actual problem was easy (but the
symptoms were missleading)- SECONDARY_MEMORY_CLASS does not return true for
reloading ALL_REGS into FP_REGS and reload later chose integer register that do
require reload. Same problem did exist on i386 and I am attaching patch
similar to Bernd's (if I recall correctly) fix on i386 side.
Can someone, please, bootstrap this on HP-PA64? I have no access to that hardware.
Sun Jul 27 02:39:08 CEST 2003 Jan Hubicka <jh@suse.cz>
PR XXXX
* pa.h (MAYBE_FP_REG_CLASS_P): New.
(SECONDARY_MEMORY_NEEDED): Fix.
*** /root/gcc/gcc/config/pa/pa.h Mon Jul 14 01:18:25 2003
--- pa.h Sun Jul 27 01:49:24 2003
*************** extern struct rtx_def *hppa_pic_save_rtx
*** 654,663 ****
&& REGNO (IN) < FIRST_PSEUDO_REGISTER) \
? NO_REGS : secondary_reload_class (CLASS, MODE, IN))
/* On the PA it is not possible to directly move data between
GENERAL_REGS and FP_REGS. */
! #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \
! (FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2))
/* Return the stack location to use for secondary memory needed reloads. */
#define SECONDARY_MEMORY_NEEDED_RTX(MODE) \
--- 657,670 ----
&& REGNO (IN) < FIRST_PSEUDO_REGISTER) \
? NO_REGS : secondary_reload_class (CLASS, MODE, IN))
+ #define MAYBE_FP_REG_CLASS_P(CLASS) \
+ reg_classes_intersect_p ((CLASS), FP_REGS)
+
/* On the PA it is not possible to directly move data between
GENERAL_REGS and FP_REGS. */
! #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, MODE) \
! (MAYBE_FP_REG_CLASS_P (CLASS1) != FP_REG_CLASS_P (CLASS2) \
! || MAYBE_FP_REG_CLASS_P (CLASS2) != FP_REG_CLASS_P (CLASS1))
/* Return the stack location to use for secondary memory needed reloads. */
#define SECONDARY_MEMORY_NEEDED_RTX(MODE) \