Greetings, On Sun, 4 Jan 2009 20:17:23 +0100, Sebastien Lelong wrote > > > > The stack use thing has to do with compiler optimisation. When an isr > > is simple, it does not save all possible registers. But when the isr > > is more complex, it does: call l__pic_stkpush > > And doing this, it eats one precious stack level. Maybe there's an > option to tell it to kind of "pragma inline" this l__pic_stkpush.
I don't think the ISR entry/exit will call this. I'll double check. > > Iirc correct, the compiler also makes procedures and functions > > re-entrant when they are called both from level0 and isr-level. > > I can remember this, but I don't know "making func/prox re-entrant" means... > Could you give some more words on this ? If a function is called in both user and interrupt context, there's a chance that its variables will be overwritten (say it's executing in user context when an interrupt occurs). To prevent this, on entry the contents of all local variables are saved. This is what the whole `software stack size' bit is about. On exit, the contents are restored. This is where stkpush & stkpop are called. I should probably inline this instead of the function calls. --kyle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
