This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

S/390: Minor tweak to register 14 handling


Hello,

some small fallout from the 'register 14' patch: there's a couple of
cases where we still didn't fetch reg 14 from the stack before
the load multiple; this recognizes most of them.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux,
committed to CVS head.

Bye,
Ulrich

ChangeLog:

	* config/s390/s390.c (s390_emit_epilogue): Recognize more cases
	where register 14 will be saved.

Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.121
diff -c -p -r1.121 s390.c
*** gcc/config/s390/s390.c	2 Nov 2003 09:34:54 -0000	1.121
--- gcc/config/s390/s390.c	6 Nov 2003 21:18:10 -0000
*************** s390_emit_epilogue (void)
*** 5949,5955 ****
        /* Fetch return address from stack before load multiple,
  	 this will do good for scheduling.  */
  
!       if (cfun->machine->save_return_addr_p)
  	{
  	  int return_regnum = find_unused_clobbered_reg();
  	  if (!return_regnum)
--- 5953,5961 ----
        /* Fetch return address from stack before load multiple,
  	 this will do good for scheduling.  */
  
!       if (cfun->machine->save_return_addr_p
! 	  || (cfun->machine->first_restore_gpr < BASE_REGISTER
! 	      && cfun->machine->last_save_gpr > RETURN_REGNUM))
  	{
  	  int return_regnum = find_unused_clobbered_reg();
  	  if (!return_regnum)
-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]