https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90513
--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > for our kernel module we always pass option "-mlongcall" and we believe > that ,the asm thunk should generate the long call here (through call r12 in > this case) and we can fix the compiler here to do so (more conservative and > un-optimial for now). There is no point in emitting an asm thunk if you use a long call though.