Clang/LLVM provides some non-standard calling conventions on x86-64, among them preserve_most
and preserve_all
. They inform the callee that it must preserve additional registers than would be required in C calling convention on x86-64.
I’m looking for a way to get opposite effect: to allow the callee not preserving most of the general purpose registers (e.g. r12
). I have not found any calling convention which would give me this. The solution does not have to be “global” because I only need to apply it to a single function.