This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Stack implementation
- To: Toshi Morita <tm2 at best dot com>
- Subject: Re: Stack implementation
- From: Alan Lehotsky <apl at alum dot mit dot edu>
- Date: Fri, 29 Jun 2001 16:52:50 -0400
- Cc: anp1 at cec dot wustl dot edu (Aaron), gcc-bugs at gcc dot gnu dot org
- References: <200106291905.MAA08951@shell14.ba.best.com>
At 12:05 PM -0700 6/29/01, Toshi Morita wrote:
> > Where can I find the details of the stack implementation in gcc?
>>
>> (I'm interested in finding out the different components of each stack
>> frame and how big they are.)
>>
>> Aaron
>>
>> A P
>> anp1@cec.wustl.edu
>> ------------------
>
>gcc/gcc/reg-stack.c
>
>Toshi
I suspect not. I think he's asking about the call stack.
The stack-frame is target-dependent and as such is primarily documented by the code in the target.h
and target.c files. These parameterize the call-return, argument passing and automatic storage
mechanisms on a per-target basis.
Typically, this would be documented by the machine/os ABI (if one exists).
reg-stack.c implements the register-stack model used in x86 (or should I say x87?) floating
point accelerator chips.
If the port has a FUNCTION_PROLOGUE and FUNCTION_EPILOGUE macro, they will typically
provide much information, as they are usually responsible for establishing the stack
frame and allocating automatic storage. (Unless you're target is a CISC machine, and I don't
think that there are any currently active ports that use complex function-call instructions
any more. [Doesn't the VAX port use bsb instead of call instructions?]
Al Lehotsky
--
------------------------------------------------------------------------
Quality Software Management
http://home.earthlink.net/users/~qsmgmt
apl@alum.mit.edu
(978)287-0435 Voice
(978)808-6836 Cell
(978)287-0436 Fax
Software Process Improvement and Management Consulting
Language Design and Compiler Implementation