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: Allow large stack frames


Hello,

this allows use of stack frames > 2GB on 64-bit targets.

Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux;
fixes the gcc.c-torture/compile/20031023-[1234].c test case
failures on s390x.

Applied to 3.4 branch and head.

Bye,
Ulrich


	* config/s390/s390.c (s390_frame_info): Allow large frame sizes
	for TARGET_64BIT.
	(s390_arg_frame_offset): Change return type to HOST_WIDE_INT.
	* config/s390/s390-protos.h (s390_arg_frame_offset): Likewise.


Index: gcc/config/s390/s390-protos.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390-protos.h,v
retrieving revision 1.41
diff -c -p -r1.41 s390-protos.h
*** gcc/config/s390/s390-protos.h	30 Nov 2003 15:51:36 -0000	1.41
--- gcc/config/s390/s390-protos.h	22 Jan 2004 02:19:43 -0000
*************** Software Foundation, 59 Temple Place - S
*** 23,29 ****
  
  extern void optimization_options (int, int);
  extern void override_options (void);
! extern int s390_arg_frame_offset (void);
  extern void s390_load_got (int);
  extern void s390_emit_prologue (void);
  extern void s390_emit_epilogue (void);
--- 23,29 ----
  
  extern void optimization_options (int, int);
  extern void override_options (void);
! extern HOST_WIDE_INT s390_arg_frame_offset (void);
  extern void s390_load_got (int);
  extern void s390_emit_prologue (void);
  extern void s390_emit_epilogue (void);
Index: gcc/config/s390/s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.126
diff -c -p -r1.126 s390.c
*** gcc/config/s390/s390.c	20 Jan 2004 18:29:24 -0000	1.126
--- gcc/config/s390/s390.c	22 Jan 2004 02:19:45 -0000
*************** s390_frame_info (void)
*** 5303,5309 ****
    int i, j;
    HOST_WIDE_INT fsize = get_frame_size ();
  
!   if (fsize > 0x7fff0000)
      fatal_error ("Total size of local variables exceeds architecture limit.");
  
    /* fprs 8 - 15 are caller saved for 64 Bit ABI.  */
--- 5303,5309 ----
    int i, j;
    HOST_WIDE_INT fsize = get_frame_size ();
  
!   if (!TARGET_64BIT && fsize > 0x7fff0000)
      fatal_error ("Total size of local variables exceeds architecture limit.");
  
    /* fprs 8 - 15 are caller saved for 64 Bit ABI.  */
*************** s390_frame_info (void)
*** 5376,5382 ****
  /* Return offset between argument pointer and frame pointer
     initially after prologue.  */
  
! int
  s390_arg_frame_offset (void)
  {
    HOST_WIDE_INT fsize = get_frame_size ();
--- 5376,5382 ----
  /* Return offset between argument pointer and frame pointer
     initially after prologue.  */
  
! HOST_WIDE_INT
  s390_arg_frame_offset (void)
  {
    HOST_WIDE_INT fsize = get_frame_size ();
-- 
  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]