https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113312
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to H.J. Lu from comment #7) > (In reply to H. Peter Anvin from comment #6) > > Of course. That's not what we want in the Linux kernel specifically, though. > > It's really up to the OS. > > no_callee_saved_registers attribute is sufficient. One can do > void * __attribute__((no_callee_saved_registers)) fred_handler (struct fred_event_info_and_caller_saved_regs *arg) { ... }