| 1 | #![cfg_attr (feature = "compiler-builtins" , compiler_builtins)] |
| 2 | #![cfg_attr (all(target_family = "wasm" ), feature(wasm_numeric_instr))] |
| 3 | #![feature (abi_unadjusted)] |
| 4 | #![feature (asm_experimental_arch)] |
| 5 | #![feature (cfg_target_has_atomic)] |
| 6 | #![feature (compiler_builtins)] |
| 7 | #![feature (core_intrinsics)] |
| 8 | #![feature (linkage)] |
| 9 | #![feature (naked_functions)] |
| 10 | #![feature (repr_simd)] |
| 11 | #![cfg_attr (f16_enabled, feature(f16))] |
| 12 | #![cfg_attr (f128_enabled, feature(f128))] |
| 13 | #![no_builtins ] |
| 14 | #![no_std ] |
| 15 | #![allow (unused_features)] |
| 16 | #![allow (internal_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)] |
| 25 | |
| 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. |
| 28 | |
| 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 |
| 31 | |
| 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. |
| 35 | |
| 36 | #[cfg (test)] |
| 37 | extern crate core; |
| 38 | |
| 39 | #[macro_use ] |
| 40 | mod macros; |
| 41 | |
| 42 | pub mod float; |
| 43 | pub mod int; |
| 44 | pub mod math; |
| 45 | pub mod mem; |
| 46 | |
| 47 | // `libm` expects its `support` module to be available in the crate root. |
| 48 | use math::libm::support; |
| 49 | |
| 50 | #[cfg (target_arch = "arm" )] |
| 51 | pub mod arm; |
| 52 | |
| 53 | #[cfg (any(target_arch = "aarch64" , target_arch = "arm64ec" ))] |
| 54 | pub mod aarch64; |
| 55 | |
| 56 | #[cfg (all(target_arch = "aarch64" , target_os = "linux" , not(feature = "no-asm" ),))] |
| 57 | pub mod aarch64_linux; |
| 58 | |
| 59 | #[cfg (all( |
| 60 | kernel_user_helpers, |
| 61 | any(target_os = "linux" , target_os = "android" ), |
| 62 | target_arch = "arm" |
| 63 | ))] |
| 64 | pub mod arm_linux; |
| 65 | |
| 66 | #[cfg (target_arch = "hexagon" )] |
| 67 | pub mod hexagon; |
| 68 | |
| 69 | #[cfg (any(target_arch = "riscv32" , target_arch = "riscv64" ))] |
| 70 | pub mod riscv; |
| 71 | |
| 72 | #[cfg (target_arch = "x86" )] |
| 73 | pub mod x86; |
| 74 | |
| 75 | #[cfg (target_arch = "x86_64" )] |
| 76 | pub mod x86_64; |
| 77 | |
| 78 | pub mod probestack; |
| 79 | |