"Preserve none" calling convention (original) (raw)
February 16, 2022, 8:20pm 1
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.
chfast June 21, 2023, 8:43am 2
Seems like ghc
or tailcc
may be good candidates, but they are not available in Clang.