This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] i960 prolog
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] i960 prolog
- From: DJ Delorie <dj at redhat dot com>
- Date: Thu, 1 Mar 2001 15:31:47 -0500
I had found a bug in Vlad's previous changes to this code, and he
suggested this fix, which works for me. Fixes execute/struct-ret-1.c
for i960, and many other subtle problems ;-) OK to apply?
2001-03-01 DJ Delorie <dj@redhat.com>
Vladimir Makarov <vmakarov@redhat.com>
* config/i960/i960.c (i960_function_prologue): Compute size of
frame according to number of registers actually saved there.
Index: config/i960/i960.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i960/i960.c,v
retrieving revision 1.19
diff -p -3 -r1.19 i960.c
*** i960.c 2000/09/07 22:24:33 1.19
--- i960.c 2001/03/01 20:28:55
*************** i960_function_prologue (file, size)
*** 1474,1480 ****
lnw = i960_split_reg_group (l, lnw, g->length);
}
! actual_fsize = compute_frame_size (size);
#if 0
/* ??? The 1.2.1 compiler does this also. This is meant to round the frame
size up to the nearest multiple of 16. I don't know whether this is
--- 1474,1480 ----
lnw = i960_split_reg_group (l, lnw, g->length);
}
! actual_fsize = compute_frame_size (size) + 4 * n_remaining_saved_regs;
#if 0
/* ??? The 1.2.1 compiler does this also. This is meant to round the frame
size up to the nearest multiple of 16. I don't know whether this is
*************** i960_function_prologue (file, size)
*** 1526,1532 ****
/* Take hardware register save area created by the call instruction
into account, but store them before the argument block area. */
! lvar_size = actual_fsize - compute_frame_size (0) - n_saved_regs * 4;
offset = STARTING_FRAME_OFFSET + lvar_size;
/* Save registers on stack if needed. */
/* ??? Is it worth to use the same algorithm as one for saving
--- 1526,1532 ----
/* Take hardware register save area created by the call instruction
into account, but store them before the argument block area. */
! lvar_size = actual_fsize - compute_frame_size (0) - n_remaining_saved_regs * 4;
offset = STARTING_FRAME_OFFSET + lvar_size;
/* Save registers on stack if needed. */
/* ??? Is it worth to use the same algorithm as one for saving