SPARC, register renaming, __builtin_return_address
David Edelsohn
dje@watson.ibm.com
Mon May 14 09:59:00 GMT 2001
>>>>> Mark Mitchell writes:
Mark> But, I'm not sure what "force a stack frame" means.
I meant something similar to rs6000.c:rs6000_stack_info() which
does:
/* 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, 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 + 18*8 = 288 (GPR13 reserved).
For V.4 we don't have the stack cushion that AIX uses, but assume that
the debugger can handle stackless frames. */
if (info_ptr->calls_p)
info_ptr->push_p = 1;
else if (abi == ABI_V4 || abi == ABI_SOLARIS)
info_ptr->push_p = (total_raw_size > info_ptr->fixed_size
|| info_ptr->calls_p);
else
info_ptr->push_p = (frame_pointer_needed
|| write_symbols != NO_DEBUG
|| ((total_raw_size - info_ptr->fixed_size)
> (TARGET_32BIT ? 220 : 288)));
Note that for the AIX case, write_symbols != NO_DEBUG is one case. (I am
not sure if the debugger still has problems with stackess frames.)
I was suggesting that the equivalent part of the SPARC machine
description find some conservative test to require a stack frame in the
sort of cases that you are encountering.
David
More information about the Gcc
mailing list