clobber_return_register fix

Jan Hubicka jh@suse.cz
Thu Jun 7 03:22:00 GMT 2001


> On Wed, Jun 06, 2001 at 03:01:32PM +0200, Jan Hubicka wrote:
> > +       if (REG_P (decl_rtl)
> > + 	  ? REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER
> > + 	  : DECL_REGISTER (decl_result))
> 
> I don't understand the purpose of checking DECL_REGISTER
> for a non-register?
hmm, this version looks better?

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/07 10:20:22
*************** void
*** 6601,6606 ****
--- 6574,6589 ----
  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)))
+     {
+       rtx decl_rtl = DECL_RTL (decl_result);
+       if (REG_P (decl_rtl) && REGNO (decl_rtl) >= FIRST_PSEUDO_REGISTER)
+ 	{
+ 	  do_clobber_return_reg (decl_rtl, NULL);
+ 	}
+     }
  }
  
  static void



More information about the Gcc-patches mailing list