* sparc.c (sparc_flat_compute_frame_size): Correctly calc args_size
From-SVN: r23634
This commit is contained in:
parent
a49fb37af2
commit
8c64be75d3
2 changed files with 27 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Nov 13 11:02:11 1998 Stan Cox <scox@cygnus.com>
|
||||
|
||||
* sparc.c (sparc_flat_compute_frame_size): Correctly calc args_size
|
||||
in a leaf function. Clarify total_size/extra_size relationship.
|
||||
|
||||
Thu Nov 12 19:20:57 1998 Geoffrey Noer <noer@cygnus.com>
|
||||
|
||||
* i386/cygwin32.asm: Delete.
|
||||
|
|
|
@ -5630,18 +5630,23 @@ sparc_flat_compute_frame_size (size)
|
|||
|
||||
/* This is the size of the 16 word reg save area, 1 word struct addr
|
||||
area, and 4 word fp/alu register copy area. */
|
||||
extra_size = -STARTING_FRAME_OFFSET + FIRST_PARM_OFFSET(0);
|
||||
var_size = size;
|
||||
/* Also include the size needed for the 6 parameter registers. */
|
||||
args_size = current_function_outgoing_args_size + 24;
|
||||
total_size = var_size + args_size + extra_size;
|
||||
gp_reg_size = 0;
|
||||
fp_reg_size = 0;
|
||||
gmask = 0;
|
||||
fmask = 0;
|
||||
reg_offset = 0;
|
||||
extra_size = -STARTING_FRAME_OFFSET + FIRST_PARM_OFFSET(0);
|
||||
var_size = size;
|
||||
gp_reg_size = 0;
|
||||
fp_reg_size = 0;
|
||||
gmask = 0;
|
||||
fmask = 0;
|
||||
reg_offset = 0;
|
||||
need_aligned_p = 0;
|
||||
|
||||
args_size = 0;
|
||||
if (!leaf_function_p ())
|
||||
{
|
||||
/* Also include the size needed for the 6 parameter registers. */
|
||||
args_size = current_function_outgoing_args_size + 24;
|
||||
}
|
||||
total_size = var_size + args_size;
|
||||
|
||||
/* Calculate space needed for gp registers. */
|
||||
for (regno = 1; regno <= 31; regno++)
|
||||
{
|
||||
|
@ -5690,9 +5695,13 @@ sparc_flat_compute_frame_size (size)
|
|||
total_size += gp_reg_size + fp_reg_size;
|
||||
}
|
||||
|
||||
/* ??? This looks a little suspicious. Clarify. */
|
||||
if (total_size == extra_size)
|
||||
total_size = extra_size = 0;
|
||||
/* If we must allocate a stack frame at all, we must also allocate
|
||||
room for register window spillage, so as to be binary compatible
|
||||
with libraries and operating systems that do not use -mflat. */
|
||||
if (total_size > 0)
|
||||
total_size += extra_size;
|
||||
else
|
||||
extra_size = 0;
|
||||
|
||||
total_size = SPARC_STACK_ALIGN (total_size);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue