This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix _savef* on powerpc*-ibm-aix*
The _savef* functions need to be called before the stack pointer is
adjusted. Since Jakub's 2003-07-16 change, the stack adjustment happens
right at the start of the prologue when current_function_calls_eh_return,
so we can't use _savef*.
I've been playing with defining FP_SAVE_INLINE for powerpc64-linux,
which is how I ran into the problem..
* config/rs6000/rs6000.c (rs6000_emit_prologue): Save fp regs inline
if current_function_calls_eh_return.
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.507
diff -u -p -r1.507 rs6000.c
--- gcc/config/rs6000/rs6000.c 21 Jul 2003 20:18:51 -0000 1.507
+++ gcc/config/rs6000/rs6000.c 23 Jul 2003 09:13:47 -0000
@@ -11254,6 +11254,7 @@ rs6000_emit_prologue ()
&& info->first_gp_reg_save < 31);
saving_FPRs_inline = (info->first_fp_reg_save == 64
|| FP_SAVE_INLINE (info->first_fp_reg_save)
+ || current_function_calls_eh_return
|| cfun->machine->ra_need_lr);
/* For V.4, update stack before we do any saving and set back pointer. */
--
Alan Modra
IBM OzLabs - Linux Technology Centre