Hi all,
Consider something like this:
void (*func)(void); SIGNAL(SIG_OVERFLOW0) { // Do some stuff... if( rare_condition ) func(); }
The "problem" here is that gcc (or any compiler I guess) is pushing all the scratch registers on to the stack in the prologue because of the call to "func", which only happens rarely.
Assuming I really want to keep using the function pointer (this is a simplification of what I want to accomplish), does anybody have any ideas on techniques I could use to avoid the register push/pop overhead except when needed?
- kwr