rust/compiler/rustc_codegen_gcc/src
bors 75963ce795 Auto merge of #151065 - nagisa:add-preserve-none-abi, r=petrochenkov
abi: add a rust-preserve-none calling convention

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?)
2026-01-25 02:49:32 +00:00
..
back Rollup merge of #149209 - lto_refactors8, r=jackh726 2026-01-21 02:04:01 -05:00
intrinsic Rollup merge of #151346 - folkertdev:simd-splat, r=workingjubilee 2026-01-24 21:04:15 +01:00
abi.rs abi: add a rust-preserve-none calling convention 2026-01-24 19:23:17 +02:00
allocator.rs Remove -Zoom=panic 2025-11-28 19:30:39 +00:00
asm.rs Allow PowerPC spe_acc as clobber-only register 2025-12-03 12:37:22 -06:00
attributes.rs Merge commit '55171cfa8b' into subtree-update_cg_gcc_2025-11-26 2025-11-26 19:41:43 +01:00
base.rs Auto merge of #148481 - GuillaumeGomez:subtree-update_cg_gcc_2025-11-04, r=GuillaumeGomez 2025-11-13 18:00:02 +00:00
builder.rs Partially inline get_fn_addr/get_fn in codegen_llvm_intrinsic_call 2025-12-27 17:46:26 +00:00
callee.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
common.rs Fix ICE on offsetted ZST pointer 2025-10-15 20:06:46 -04:00
consts.rs Merge commit '55171cfa8b' into subtree-update_cg_gcc_2025-11-26 2025-11-26 19:41:43 +01:00
context.rs Partially inline get_fn_addr/get_fn in codegen_llvm_intrinsic_call 2025-12-27 17:46:26 +00:00
coverageinfo.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00
debuginfo.rs Adapt and fix cg_gcc to the overhauled filename remapping 2025-12-12 07:34:52 +01:00
declare.rs Partially inline get_fn_addr/get_fn in codegen_llvm_intrinsic_call 2025-12-27 17:46:26 +00:00
errors.rs Implement support for explicit tail calls in the MIR block builders and the LLVM codegen backend. 2025-07-26 01:02:29 +02:00
gcc_util.rs Use rust rather than LLVM target features in the target spec 2025-11-25 14:39:42 +00:00
int.rs Merge commit 'dab6863ce8' into subtree-update_cg_gcc_2025-12-04 2025-12-04 14:53:08 +01:00
lib.rs Rollup merge of #149209 - lto_refactors8, r=jackh726 2026-01-21 02:04:01 -05:00
mono_item.rs Merge commit '55171cfa8b' into subtree-update_cg_gcc_2025-11-26 2025-11-26 19:41:43 +01:00
type_.rs Merge commit '55171cfa8b' into subtree-update_cg_gcc_2025-11-26 2025-11-26 19:41:43 +01:00
type_of.rs codegen: implement repr(scalable) 2025-12-16 11:00:12 +00:00