aboutsummaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1997-07-17 11:26:10 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1997-07-17 11:26:10 -0400
commit76e0d2113de257d2505bba2cb82f9117ca74034c (patch)
tree5589ec2fb0d9cd51eec2cbedc6dda78ab317468a /gcc/reload1.c
parent11044f6690c12aa40ed84655c9949e0e3ab16bd1 (diff)
downloadgcc-76e0d2113de257d2505bba2cb82f9117ca74034c.zip
gcc-76e0d2113de257d2505bba2cb82f9117ca74034c.tar.gz
gcc-76e0d2113de257d2505bba2cb82f9117ca74034c.tar.bz2
(reload): If checking stack, verify frame small enough.
From-SVN: r14471
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index ca61d97..8ad19a6 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -2162,6 +2162,20 @@ reload (first, global, dumpfile)
}
#endif
+ /* If we are doing stack checking, give a warning if this function's
+ frame size is larger than we expect. */
+ if (flag_stack_check && ! STACK_CHECK_BUILTIN)
+ {
+ HOST_WIDE_INT size = get_frame_size () + STACK_CHECK_FIXED_FRAME_SIZE;
+
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ if (regs_ever_live[i] && ! fixed_regs[i] && call_used_regs[i])
+ size += UNITS_PER_WORD;
+
+ if (size > STACK_CHECK_MAX_FRAME_SIZE)
+ warning ("frame size too large for reliable stack checking");
+ }
+
/* Indicate that we no longer have known memory locations or constants. */
reg_equiv_constant = 0;
reg_equiv_memory_loc = 0;