This is the mail archive of the gcc@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: AVR prologue & epilogue


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




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