https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113312
--- Comment #14 from H.J. Lu <hjl.tools at gmail dot com> --- Here is a branch for __attribute__((no_callee_saved_registers)): https://gitlab.com/x86-gcc/gcc/-/commits/users/hjl/pr113312/master Calling a function with __attribute__((no_callee_saved_registers)) doesn't work since GCC won't restore clobbered caller-saved registers. Also calling a function with __attribute__((no_callee_saved_registers)) via a function pointer won't work correctly.