https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55757

Yann Poupet <yann at poupet dot eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yann at poupet dot eu

--- Comment #8 from Yann Poupet <yann at poupet dot eu> ---
Hi,

I had the same issue and modified GCC so that the prologue/epilogue do not
save/restore R4-R11 if it's not required - assuming these are caller-saved
(same effect as -fcall-used-[r4...r11]), with a new function attribute. I'm not
sure if this has a chance to be accepted upstream though.

I'm using it in 2 cases:

- ISR as described above
- for the tasks launched by my own home made microkernel. Indeed, when the
kernel starts a task starting its entry function, there's no need to save any
register, it's just a waste of stack space.

Anyone still interested with a solution ?
The patch is very small, maybe 10 lines.

Cheers
Yann

Reply via email to