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]

Patch: fix regression in sibcalls (ppc & elsewhere) redone


One more time. This does what Geoff suggested. Bootstrapped and tested on Darwin.

2003-01-06 Dale Johannesen <dalej@apple.com>

* function.c (assign_parms): Don't set pretend_args_size if REG_PARM_STACK_SPACE.
function.h (struct function): Clarify behavior of pretend_args_size.
config/rs6000/rs6000.c (setup_incoming_varargs): Don't set pretend_args_size.


Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.390
diff -u -d -b -w -c -3 -p -r1.390 function.c
cvs server: conflicting specifications of output style
*** function.c 16 Dec 2002 18:19:29 -0000 1.390
--- function.c 7 Jan 2003 01:38:30 -0000
*************** assign_parms (fndecl)
*** 4477,4482 ****
--- 4477,4488 ----

if (nregs > 0)
{
+ #if defined (REG_PARM_STACK_SPACE) && !defined (MAYBE_REG_PARM_STACK_SPACE)
+ /* When REG_PARM_STACK_SPACE is nonzero, stack space for
+ split parameters was allocated by our caller, so we
+ won't be pushing it in the prolog. */
+ if (REG_PARM_STACK_SPACE (fndecl) == 0)
+ #endif
current_function_pretend_args_size
= (((nregs * UNITS_PER_WORD) + (PARM_BOUNDARY / BITS_PER_UNIT) - 1)
/ (PARM_BOUNDARY / BITS_PER_UNIT)
Index: function.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.h,v
retrieving revision 1.90
diff -u -d -b -w -c -3 -p -r1.90 function.h
cvs server: conflicting specifications of output style
*** function.h 16 Dec 2002 18:19:29 -0000 1.90
--- function.h 7 Jan 2003 01:38:30 -0000
*************** struct function GTY(())
*** 207,213 ****

/* # bytes the prologue should push and pretend that the caller pushed them.
The prologue must do this, but only if parms can be passed in
! registers. */
int pretend_args_size;

/* # of bytes of outgoing arguments. If ACCUMULATE_OUTGOING_ARGS is
--- 207,213 ----

/* # bytes the prologue should push and pretend that the caller pushed them.
The prologue must do this, but only if parms can be passed in
! registers, and not when REG_PARM_STACK_SPACE is nonzero. */
int pretend_args_size;

/* # of bytes of outgoing arguments. If ACCUMULATE_OUTGOING_ARGS is
Index: config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.407
diff -u -d -b -w -c -3 -p -r1.407 rs6000.c
cvs server: conflicting specifications of output style
*** config/rs6000/rs6000.c 3 Jan 2003 23:09:33 -0000 1.407
--- config/rs6000/rs6000.c 7 Jan 2003 01:38:31 -0000
*************** setup_incoming_varargs (cum, mode, type,
*** 3325,3331 ****
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
! int *pretend_size;
int no_rtl;

{
--- 3325,3331 ----
CUMULATIVE_ARGS *cum;
enum machine_mode mode;
tree type;
! int *pretend_size ATTRIBUTE_UNUSED;
int no_rtl;

{
*************** setup_incoming_varargs (cum, mode, type,
*** 3380,3388 ****
(GP_ARG_MIN_REG + first_reg_offset, mem,
GP_ARG_NUM_REG - first_reg_offset,
(GP_ARG_NUM_REG - first_reg_offset) * UNITS_PER_WORD);
-
- /* ??? Does ABI_V4 need this at all? */
- *pretend_size = (GP_ARG_NUM_REG - first_reg_offset) * UNITS_PER_WORD;
}

/* Save FP registers if needed. */
--- 3380,3385 ----


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