This is the conceptual opposite of the rust-cold calling convention and
is particularly useful in combination with the new `explicit_tail_calls`
feature.
For relatively tight loops implemented with tail calling (`become`) each
of the function with the regular calling convention is still responsible
for restoring the initial value of the preserved registers. So it is not
unusual to end up with a situation where each step in the tail call loop
is spilling and reloading registers, along the lines of:
foo:
push r12
; do things
pop r12
jmp next_step
This adds up quickly, especially when most of the clobberable registers
are already used to pass arguments or other uses.
I was thinking of making the name of this ABI a little less LLVM-derived
and more like a conceptual inverse of `rust-cold`, but could not come
with a great name (`rust-cold` is itself not a great name: cold in what
context? from which perspective? is it supposed to mean that the
function is rarely called?)
38 lines
465 B
Text
38 lines
465 B
Text
C
|
|
C-unwind
|
|
Rust
|
|
aapcs
|
|
aapcs-unwind
|
|
avr-interrupt
|
|
avr-non-blocking-interrupt
|
|
cdecl
|
|
cdecl-unwind
|
|
cmse-nonsecure-call
|
|
cmse-nonsecure-entry
|
|
custom
|
|
efiapi
|
|
fastcall
|
|
fastcall-unwind
|
|
gpu-kernel
|
|
msp430-interrupt
|
|
ptx-kernel
|
|
riscv-interrupt-m
|
|
riscv-interrupt-s
|
|
rust-call
|
|
rust-cold
|
|
rust-invalid
|
|
rust-preserve-none
|
|
stdcall
|
|
stdcall-unwind
|
|
system
|
|
system-unwind
|
|
sysv64
|
|
sysv64-unwind
|
|
thiscall
|
|
thiscall-unwind
|
|
unadjusted
|
|
vectorcall
|
|
vectorcall-unwind
|
|
win64
|
|
win64-unwind
|
|
x86-interrupt
|