aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@mhpcc.edu>1998-04-18 16:16:02 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>1998-04-18 12:16:02 -0400
commitdb72d7a1d62b2034c01d0ac725a27e887957486d (patch)
tree57a3df15674f6776c2f484defd025076efd8940b /gcc
parenta1ecb5ca07e249b185dce0eec10139b65deddb8d (diff)
downloadgcc-db72d7a1d62b2034c01d0ac725a27e887957486d.zip
gcc-db72d7a1d62b2034c01d0ac725a27e887957486d.tar.gz
gcc-db72d7a1d62b2034c01d0ac725a27e887957486d.tar.bz2
rs6000.md (floatsidf2_loadaddr): rs6000_fpmem_offset will be negative in a stackless frame.
* rs6000.md (floatsidf2_loadaddr): rs6000_fpmem_offset will be negative in a stackless frame. * rs6000.c (rs6000_stack_info): Don't include fixed-size link area in stackless frame size. Support 64-bit stackless frame size. Combine fpmem offset calculations and don't add total_size to offset if not pushing a stack frame. From-SVN: r19283
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/rs6000/rs6000.c32
-rw-r--r--gcc/config/rs6000/rs6000.md2
3 files changed, 27 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0ead4e8..8a8b192 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+Sat Apr 18 19:06:59 1998 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * rs6000.md (floatsidf2_loadaddr): rs6000_fpmem_offset will be
+ negative in a stackless frame.
+ * rs6000.c (rs6000_stack_info): Don't include fixed-size link area
+ in stackless frame size. Support 64-bit stackless frame size.
+ Combine fpmem offset calculations and don't add total_size to
+ offset if not pushing a stack frame.
+
Sat Apr 18 15:41:16 1998 Jim Wilson <wilson@cygnus.com>
* regmove.c (fixup_match_1): In three places, in flag_exceptions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d98662a..f901cb0 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3228,10 +3228,13 @@ rs6000_stack_info ()
info_ptr->total_size = RS6000_ALIGN (total_raw_size, ABI_STACK_BOUNDARY / BITS_PER_UNIT);
- /* Determine if we need to allocate any stack frame.
- For AIX We need to push the stack if a frame pointer is needed (because
- the stack might be dynamically adjusted), if we are debugging, if the
- total stack size is more than 220 bytes, or if we make calls.
+ /* Determine if we need to allocate any stack frame:
+
+ For AIX we need to push the stack if a frame pointer is needed (because
+ the stack might be dynamically adjusted), if we are debugging, if we
+ make calls, or if the sum of fp_save, gp_save, fpmem, and local variables
+ are more than the space needed to save all non-volatile registers:
+ 32-bit: 18*8 + 19*4 = 220 or 64-bit: 18*8 + 19*8 = 296
For V.4 we don't have the stack cushion that AIX uses, but assume that
the debugger can handle stackless frames. */
@@ -3247,7 +3250,8 @@ rs6000_stack_info ()
else
info_ptr->push_p = (frame_pointer_needed
|| write_symbols != NO_DEBUG
- || info_ptr->total_size > 220);
+ || ((info_ptr->total_size - info_ptr->fixed_size)
+ > (TARGET_32BIT ? 220 : 296)));
/* Calculate the offsets */
switch (abi)
@@ -3289,7 +3293,15 @@ rs6000_stack_info ()
}
if (info_ptr->fpmem_p)
- info_ptr->fpmem_offset = STARTING_FRAME_OFFSET - info_ptr->total_size + info_ptr->vars_size;
+ {
+ info_ptr->fpmem_offset = info_ptr->main_save_offset - info_ptr->fpmem_size;
+ rs6000_fpmem_size = info_ptr->fpmem_size;
+ rs6000_fpmem_offset = info_ptr->push_p
+ ? info_ptr->total_size + info_ptr->fpmem_offset
+ : info_ptr->fpmem_offset;
+ }
+ else
+ info_ptr->fpmem_offset = 0;
/* Zero offsets if we're not saving those registers */
if (!info_ptr->fp_size)
@@ -3310,14 +3322,6 @@ rs6000_stack_info ()
if (!info_ptr->main_save_p)
info_ptr->main_save_offset = 0;
- if (!info_ptr->fpmem_p)
- info_ptr->fpmem_offset = 0;
- else
- {
- rs6000_fpmem_size = info_ptr->fpmem_size;
- rs6000_fpmem_offset = info_ptr->total_size + info_ptr->fpmem_offset;
- }
-
return info_ptr;
}
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index da07fbf..71a14e5 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -3701,8 +3701,6 @@
xop[2] = GEN_INT ((rs6000_fpmem_offset >> 16) + ((rs6000_fpmem_offset & 0x8000) >> 15));
output_asm_insn (\"{cau|addis} %0,%1,%2\", xop);
}
- else if (rs6000_fpmem_offset < 0)
- abort ();
return \"\";
}"