]>
git.proxmox.com Git - rustc.git/blob - vendor/compiler_builtins/src/lib.rs
1 #![cfg_attr(feature = "compiler-builtins", compiler_builtins)]
2 #![cfg_attr(not(feature = "no-asm"), feature(asm))]
3 #![feature(abi_unadjusted)]
4 #![cfg_attr(not(feature = "no-asm"), feature(global_asm))]
5 #![feature(cfg_target_has_atomic)]
6 #![feature(compiler_builtins)]
7 #![feature(core_ffi_c)]
8 #![feature(core_intrinsics)]
9 #![feature(inline_const)]
10 #![feature(lang_items)]
12 #![feature(naked_functions)]
13 #![feature(repr_simd)]
16 #![allow(unused_features)]
17 // We use `u128` in a whole bunch of places which we currently agree with the
18 // compiler on ABIs and such, so we should be "good enough" for now and changes
19 // to the `u128` ABI will be reflected here.
20 #![allow(improper_ctypes, improper_ctypes_definitions)]
21 // `mem::swap` cannot be used because it may generate references to memcpy in unoptimized code.
22 #![allow(clippy::manual_swap)]
23 // Support compiling on both stage0 and stage1 which may differ in supported stable features.
24 #![allow(stable_features)]
26 // We disable #[no_mangle] for tests so that we can verify the test results
27 // against the native compiler-rt implementations of the builtins.
29 // NOTE cfg(all(feature = "c", ..)) indicate that compiler-rt provides an arch optimized
30 // implementation of that intrinsic and we'll prefer to use that
32 // NOTE(aapcs, aeabi, arm) ARM targets use intrinsics named __aeabi_* instead of the intrinsics
33 // that follow "x86 naming convention" (e.g. addsf3). Those aeabi intrinsics must adhere to the
34 // AAPCS calling convention (`extern "aapcs"`) because that's how LLVM will call them.
46 all(target_family
= "wasm", target_os
= "unknown"),
47 all(target_arch
= "x86_64", target_os
= "uefi"),
48 all(target_arch
= "arm", target_os
= "none"),
50 all(target_vendor
= "fortanix", target_env
= "sgx")
55 #[cfg(target_arch = "arm")]
60 any(target_os
= "linux", target_os
= "android"),
65 #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
68 #[cfg(target_arch = "x86")]
71 #[cfg(target_arch = "x86_64")]