This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Maintaining multiple stacks


Tom Bachmann <e_mc_h2@web.de> wrote:
>
> For practical matters, I was asking for existing such support. Thank you
> for that (negative) response anyway. Can you (or someone else) estimate
> the complexity of adding such support?

As far as providing a full ability for the programmer to select between
multiple stacks, either statically or dynamically, it is foul.  The
problems are fundamental in the problem, and hence cannot be easy in
gcc.  Think about the semantics of compiler-generated temporaries,
longjmp/setjmp/exceptions/unwinding etc.

As far as providing a traditional secondary stack, such as to put
large and dynamically-sized arrays on, that would be a LOT easier.
That is the sort of secondary stack that I keep banging on about;
by removing those from the primary stack, it improves cache locality
and makes it easier for debuggers and tracebacks.

As far as providing an alternate stack for exception handling, that
is already available (it is a run-time system feature and not a
compiler one).

But there are other reasons you may want them.  Without knowing the
details, it is impossible to guess.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]