https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113312
--- Comment #17 from H.J. Lu <hjl.tools at gmail dot com> --- Please try users/hjl/pr113312/gcc-13 branch: https://gitlab.com/x86-gcc/gcc/-/tree/users/hjl/pr113312/gcc-13?ref_type=heads It supports no_callee_saved_registers attribute. It should also avoid saving registers in noreturn functions in Linux kernel.