rs6000.h (machine_function): Add ra_need_lr.
authorJakub Jelinek <jakub@redhat.com>
Mon, 21 Jul 2003 20:18:52 +0000 (22:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 21 Jul 2003 20:18:52 +0000 (22:18 +0200)
* config/rs6000/rs6000.h (machine_function): Add ra_need_lr.
* config/rs6000/rs6000.c (rs6000_return_addr): Set it.
(rs6000_emit_prologue): Save FPRs inline if set.

From-SVN: r69645

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h

index 0b2247aa34b93042758e9d5a113d6e9776605247..cd57ee3ab5f5cf14d5f3ced4d70afbe80e5a02a4 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-21  Jakub Jelinek  <jakub@redhat.com>
+
+       * config/rs6000/rs6000.h (machine_function): Add ra_need_lr.
+       * config/rs6000/rs6000.c (rs6000_return_addr): Set it.
+       (rs6000_emit_prologue): Save FPRs inline if set.
+
 2003-07-21  H.J. Lu <hongjiu.lu@intel.com>
 
        * config/ia64/ia64.md (prefetch): Support predicate.
index 8f268974aa5d178a6e7453f603089db4cf99c02d..580d951e05ba30e2b3b8f40115fee9586393e746 100644 (file)
@@ -10542,6 +10542,7 @@ rs6000_return_addr (count, frame)
                           RETURN_ADDRESS_OFFSET)));
     }
 
+  cfun->machine->ra_need_lr = 1;
   return get_hard_reg_initial_val (Pmode, LINK_REGISTER_REGNUM);
 }
 
@@ -11252,7 +11253,8 @@ rs6000_emit_prologue ()
                              || info->spe_64bit_regs_used == 0)
                          && info->first_gp_reg_save < 31);
   saving_FPRs_inline = (info->first_fp_reg_save == 64
-                       || FP_SAVE_INLINE (info->first_fp_reg_save));
+                       || FP_SAVE_INLINE (info->first_fp_reg_save)
+                       || cfun->machine->ra_need_lr);
 
   /* For V.4, update stack before we do any saving and set back pointer.  */
   if (info->push_p
index 5ba18dce5cdfebe6afe5d66a8c4a3fcc7645e0a0..dd10fa9953b9f6a2cd467977165e04fb14ead1db 100644 (file)
@@ -1708,6 +1708,8 @@ typedef struct machine_function GTY(())
   const char *some_ld_name;
   /* Whether the instruction chain has been scanned already.  */
   int insn_chain_scanned_p;
+  /* Flags if __builtin_return_address (0) was used.  */
+  int ra_need_lr;
 } machine_function;
 
 /* Define a data type for recording info about an argument list