This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
(Nearly) Duplicate -fstack-check Code in egcs/gcc/reload1.c
- To: egcs at egcs dot cygnus dot com
- Subject: (Nearly) Duplicate -fstack-check Code in egcs/gcc/reload1.c
- From: craig at jcb-sc dot com
- Date: 28 Mar 1999 09:53:37 -0000
- Cc: craig at jcb-sc dot com
Could someone knowledgable about the history of this code look
into whether one of the two nearly identical chunks of code,
below, should be deleted? My guess is that the first is older.
(They appear, as shown, in reload1.c.)
tq vm, (burley)
/* 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");
}
/* 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;
static int verbose_warned = 0;
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");
if (! verbose_warned)
{
warning ("try reducing the number of local variables");
verbose_warned = 1;
}
}
}