rust/compiler/rustc_codegen_llvm/src
bors 1daec069fb Auto merge of #128004 - folkertdev:naked-fn-asm, r=Amanieu
codegen `#[naked]` functions using global asm

tracking issue: https://github.com/rust-lang/rust/issues/90957

Fixes #124375

This implements the approach suggested in the tracking issue: use the existing global assembly infrastructure to emit the body of `#[naked]` functions. The main advantage is that we now have full control over what gets generated, and are no longer dependent on LLVM not sneakily messing with our output (inlining, adding extra instructions, etc).

I discussed this approach with `@Amanieu` and while I think the general direction is correct, there is probably a bunch of stuff that needs to change or move around here. I'll leave some inline comments on things that I'm not sure about.

Combined with https://github.com/rust-lang/rust/pull/127853, if both accepted, I think that resolves all steps from the tracking issue.

r? `@Amanieu`
2024-12-11 21:51:07 +00:00
..
back Use c"lit" for CStrings without unwrap 2024-12-02 18:16:36 +00:00
coverageinfo coverage: Store intermediate region tables in CovfunRecord 2024-12-11 21:35:45 +11:00
debuginfo Remove polymorphization 2024-12-06 16:42:09 -05:00
llvm Respect verify-llvm-ir option in the backend 2024-11-26 15:26:03 +01:00
abi.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
allocator.rs Clean up FFI calls for operand bundles 2024-10-30 13:26:24 +11:00
asm.rs codegen #[naked] functions using global_asm! 2024-12-10 21:41:03 +01:00
attributes.rs codegen #[naked] functions using global_asm! 2024-12-10 21:41:03 +01:00
base.rs Allow disabling ASan instrumentation for globals 2024-11-02 22:35:34 +01:00
builder.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
callee.rs Share inline(never) generics across crates 2024-11-28 13:43:05 -05:00
common.rs Remove polymorphization 2024-12-06 16:42:09 -05:00
consts.rs Rollup merge of #127483 - BertalanD:no_sanitize-global-var, r=rcvalle 2024-11-23 20:19:51 +08:00
context.rs wasm(32|64): update alignment string 2024-12-11 05:52:59 -05:00
declare.rs Use a type-safe helper to cast &str and &[u8] to *const c_char 2024-10-28 21:31:32 +11:00
errors.rs mark some target features as 'forbidden' so they cannot be (un)set 2024-11-04 22:56:47 +01:00
intrinsic.rs Remove unnecessary int_type_width_signed function 2024-12-07 19:01:00 -08:00
lib.rs Remove all threading through of ErrorGuaranteed from the driver 2024-12-06 18:42:31 +00:00
llvm_util.rs Add the power8-crypto target feature 2024-12-09 00:41:35 +05:30
mono_item.rs use TypingEnv when no infcx is available 2024-11-18 10:38:56 +01:00
type_.rs compiler: Directly use rustc_abi in codegen 2024-11-03 12:30:32 -08:00
type_of.rs compiler: rustc_abi::Abi => BackendRepr 2024-10-29 14:56:00 -07:00
va_arg.rs Teach rust core about Xtensa VaListImpl and add a custom lowering of vaarg for xtensa. 2024-12-03 10:54:08 +00:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00