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]

egcs-1.1.1: Register save in sparc if -fpic and -mflat


I think that %l7 should be saved too in sparc if using both -fpic and
-mflat.  Please correct me if I am wrong.

Teemu

Tue Jan 12 09:49:27 1999  Teemu Torma  <tot@trema.com>

	* config/sparc/sparc.c (MUST_SAVE_REGISTER): Must save register
	PIC_OFFSET_TABLE_REGNUM if it is used.

Index: config/sparc/sparc.c
===================================================================
RCS file: /trema/cvs/gnu/egcs/gcc/config/sparc/sparc.c,v
retrieving revision 1.1.1.11
diff -c -r1.1.1.11 sparc.c
*** config/sparc/sparc.c	1998/07/16 10:21:01	1.1.1.11
--- config/sparc/sparc.c	1999/01/08 23:04:46
***************
*** 5519,5528 ****
  #define FRAME_POINTER_MASK (1 << (FRAME_POINTER_REGNUM))
  #define RETURN_ADDR_MASK (1 << (RETURN_ADDR_REGNUM))
  
! #define MUST_SAVE_REGISTER(regno) \
!  ((regs_ever_live[regno] && !call_used_regs[regno])		\
!   || (regno == FRAME_POINTER_REGNUM && frame_pointer_needed)	\
!   || (regno == RETURN_ADDR_REGNUM && regs_ever_live[RETURN_ADDR_REGNUM]))
  
  /* Return the bytes needed to compute the frame pointer from the current
     stack pointer.  */
--- 5519,5530 ----
  #define FRAME_POINTER_MASK (1 << (FRAME_POINTER_REGNUM))
  #define RETURN_ADDR_MASK (1 << (RETURN_ADDR_REGNUM))
  
! #define MUST_SAVE_REGISTER(regno)					 \
!  ((regs_ever_live[regno] && !call_used_regs[regno])			 \
!   || (regno == FRAME_POINTER_REGNUM && frame_pointer_needed)		 \
!   || (regno == RETURN_ADDR_REGNUM && regs_ever_live[RETURN_ADDR_REGNUM]) \
!   || (regno == PIC_OFFSET_TABLE_REGNUM					 \
!       && current_function_uses_pic_offset_table))
  
  /* Return the bytes needed to compute the frame pointer from the current
     stack pointer.  */


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