This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AVR prologue & epilogue
- From: Jim Wilson <wilson at tuliptree dot org>
- To: "Svein E. Seldal" <Svein dot Seldal at solidas dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 12 Jun 2003 16:46:59 -0700
- Subject: Re: AVR prologue & epilogue
- References: <3EE8C626.6090108@solidas.com>
Svein E. Seldal wrote:
I'm working with some code targetted for the AVR platform. In an
interrupt service routine, I need to switch stack just _prior_ to the
push'es of this routine and then switch back the stack just after the
pop's of the function. (This switch code is written assembly.)
If you need to do something funny, it is probably better to write the
code in assembly language instead of C. You can have a stub that calls
to a C function if that helps. Then you only need the stack switching
code in the assembly language code.
Otherwise, you probably need to add support for a machine dependent
attribute or pragma, and it will be hard to justify this for inclusion
in gcc unless you can generalize it in a useful way.
Jim