]> git.proxmox.com Git - rustc.git/blame - vendor/compiler_builtins/src/lib.rs
New upstream version 1.54.0+dfsg1
[rustc.git] / vendor / compiler_builtins / src / lib.rs
CommitLineData
041b39d2 1#![cfg_attr(feature = "compiler-builtins", compiler_builtins)]
5869c6ff 2#![cfg_attr(not(feature = "no-asm"), feature(asm))]
60c5eb7d 3#![feature(abi_unadjusted)]
5869c6ff 4#![cfg_attr(not(feature = "no-asm"), feature(global_asm))]
60c5eb7d 5#![feature(cfg_target_has_atomic)]
041b39d2
XL
6#![feature(compiler_builtins)]
7#![feature(core_intrinsics)]
60c5eb7d
XL
8#![feature(lang_items)]
9#![feature(linkage)]
041b39d2 10#![feature(naked_functions)]
041b39d2 11#![feature(repr_simd)]
041b39d2 12#![no_builtins]
60c5eb7d
XL
13#![no_std]
14#![allow(unused_features)]
15// We use `u128` in a whole bunch of places which we currently agree with the
16// compiler on ABIs and such, so we should be "good enough" for now and changes
17// to the `u128` ABI will be reflected here.
1b1a35ee 18#![allow(improper_ctypes, improper_ctypes_definitions)]
17df50a5
XL
19// `mem::swap` cannot be used because it may generate references to memcpy in unoptimized code.
20#![allow(clippy::manual_swap)]
041b39d2
XL
21
22// We disable #[no_mangle] for tests so that we can verify the test results
23// against the native compiler-rt implementations of the builtins.
24
25// NOTE cfg(all(feature = "c", ..)) indicate that compiler-rt provides an arch optimized
26// implementation of that intrinsic and we'll prefer to use that
27
28// NOTE(aapcs, aeabi, arm) ARM targets use intrinsics named __aeabi_* instead of the intrinsics
29// that follow "x86 naming convention" (e.g. addsf3). Those aeabi intrinsics must adhere to the
30// AAPCS calling convention (`extern "aapcs"`) because that's how LLVM will call them.
31
32#[cfg(test)]
33extern crate core;
34
041b39d2
XL
35#[macro_use]
36mod macros;
37
041b39d2 38pub mod float;
48663c56 39pub mod int;
041b39d2 40
48663c56
XL
41#[cfg(any(
42 all(target_arch = "wasm32", target_os = "unknown"),
43 all(target_arch = "arm", target_os = "none"),
44 all(target_vendor = "fortanix", target_env = "sgx")
45))]
8faf50e0 46pub mod math;
041b39d2
XL
47pub mod mem;
48
49#[cfg(target_arch = "arm")]
50pub mod arm;
51
17df50a5
XL
52#[cfg(all(
53 kernel_user_helpers,
54 any(target_os = "linux", target_os = "android"),
55 target_arch = "arm"
56))]
abe05a73
XL
57pub mod arm_linux;
58
b7449926
XL
59#[cfg(any(target_arch = "riscv32"))]
60pub mod riscv32;
61
ea8adc8c
XL
62#[cfg(target_arch = "x86")]
63pub mod x86;
64
041b39d2
XL
65#[cfg(target_arch = "x86_64")]
66pub mod x86_64;
67
68pub mod probestack;