This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
clobber_return_register fix
- To: Richard Henderson <rth at redhat dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, patches at x86-64 dot org
- Subject: clobber_return_register fix
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 6 Jun 2001 15:01:32 +0200
Wed Jun 6 15:00:59 CEST 2001 Jan Hubicka <jh@suse.cz>
* function.c (clobber_return_register): Clobber the pseudo return
register too.
Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.273
diff -c -3 -p -r1.273 function.c
*** function.c 2001/06/05 06:51:02 1.273
--- function.c 2001/06/06 12:56:58
*************** void
*** 6601,6606 ****
--- 6574,6592 ----
clobber_return_register ()
{
diddle_return_value (do_clobber_return_reg, NULL);
+
+ /* In case we do use pseudo to return value, clobber it too. */
+ if (DECL_RTL_SET_P (DECL_RESULT (current_function_decl)))
+ {
+ tree decl_result = DECL_RESULT (current_function_decl);
+ rtx decl_rtl = DECL_RTL (decl_result);
+ if (REG_P (decl_rtl)
+ ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
+ : DECL_REGISTER (decl_result))
+ {
+ do_clobber_return_reg (decl_rtl, NULL);
+ }
+ }
}
static void