2017-06-24 10:22:49 -07:00
|
|
|
#![cfg_attr(feature = "compiler-builtins", compiler_builtins)]
|
2019-11-11 12:19:10 -06:00
|
|
|
#![feature(abi_unadjusted)]
|
2020-04-29 15:30:10 -05:00
|
|
|
#![feature(llvm_asm)]
|
2019-12-06 06:51:42 -08:00
|
|
|
#![feature(global_asm)]
|
2019-11-11 12:38:50 -06:00
|
|
|
#![feature(cfg_target_has_atomic)]
|
2016-10-10 16:45:24 -05:00
|
|
|
#![feature(compiler_builtins)]
|
2016-08-15 21:08:04 -05:00
|
|
|
#![feature(core_intrinsics)]
|
2019-11-11 12:19:10 -06:00
|
|
|
#![feature(lang_items)]
|
|
|
|
|
#![feature(linkage)]
|
2016-08-07 15:58:05 -05:00
|
|
|
#![feature(naked_functions)]
|
2017-01-04 02:42:03 +01:00
|
|
|
#![feature(repr_simd)]
|
2016-08-13 12:16:52 -05:00
|
|
|
#![no_builtins]
|
2019-11-11 12:19:10 -06:00
|
|
|
#![no_std]
|
|
|
|
|
#![allow(unused_features)]
|
|
|
|
|
// We use `u128` in a whole bunch of places which we currently agree with the
|
|
|
|
|
// compiler on ABIs and such, so we should be "good enough" for now and changes
|
|
|
|
|
// to the `u128` ABI will be reflected here.
|
|
|
|
|
#![allow(improper_ctypes)]
|
2016-08-07 15:58:05 -05:00
|
|
|
|
2016-08-13 09:51:54 +01:00
|
|
|
// We disable #[no_mangle] for tests so that we can verify the test results
|
|
|
|
|
// against the native compiler-rt implementations of the builtins.
|
|
|
|
|
|
2016-09-26 15:55:11 -05:00
|
|
|
// NOTE cfg(all(feature = "c", ..)) indicate that compiler-rt provides an arch optimized
|
|
|
|
|
// implementation of that intrinsic and we'll prefer to use that
|
|
|
|
|
|
2017-02-07 09:41:26 -05:00
|
|
|
// NOTE(aapcs, aeabi, arm) ARM targets use intrinsics named __aeabi_* instead of the intrinsics
|
|
|
|
|
// that follow "x86 naming convention" (e.g. addsf3). Those aeabi intrinsics must adhere to the
|
|
|
|
|
// AAPCS calling convention (`extern "aapcs"`) because that's how LLVM will call them.
|
|
|
|
|
|
2016-08-13 16:58:44 -05:00
|
|
|
#[cfg(test)]
|
|
|
|
|
extern crate core;
|
|
|
|
|
|
2017-06-22 23:09:28 -07:00
|
|
|
fn abort() -> ! {
|
|
|
|
|
unsafe { core::intrinsics::abort() }
|
|
|
|
|
}
|
|
|
|
|
|
2017-06-22 22:03:07 -07:00
|
|
|
#[macro_use]
|
|
|
|
|
mod macros;
|
|
|
|
|
|
2016-08-17 15:51:37 -05:00
|
|
|
pub mod float;
|
2019-05-14 14:33:08 -07:00
|
|
|
pub mod int;
|
2016-08-17 15:50:24 -05:00
|
|
|
|
2019-05-14 14:33:08 -07:00
|
|
|
#[cfg(any(
|
|
|
|
|
all(target_arch = "wasm32", target_os = "unknown"),
|
|
|
|
|
all(target_arch = "arm", target_os = "none"),
|
|
|
|
|
all(target_vendor = "fortanix", target_env = "sgx")
|
|
|
|
|
))]
|
2018-07-12 20:40:30 -05:00
|
|
|
pub mod math;
|
2018-07-24 13:26:50 -05:00
|
|
|
pub mod mem;
|
2016-12-17 23:01:47 -05:00
|
|
|
|
2016-08-07 15:58:05 -05:00
|
|
|
#[cfg(target_arch = "arm")]
|
|
|
|
|
pub mod arm;
|
|
|
|
|
|
2017-12-26 13:01:02 -02:00
|
|
|
#[cfg(all(kernel_user_helpers, target_os = "linux", target_arch = "arm"))]
|
2016-10-31 16:03:46 +00:00
|
|
|
pub mod arm_linux;
|
|
|
|
|
|
2018-07-26 19:30:26 +02:00
|
|
|
#[cfg(any(target_arch = "riscv32"))]
|
|
|
|
|
pub mod riscv32;
|
|
|
|
|
|
2017-09-15 17:18:54 -05:00
|
|
|
#[cfg(target_arch = "x86")]
|
|
|
|
|
pub mod x86;
|
|
|
|
|
|
2016-08-16 17:46:46 -05:00
|
|
|
#[cfg(target_arch = "x86_64")]
|
|
|
|
|
pub mod x86_64;
|
2017-07-05 22:18:19 -07:00
|
|
|
|
|
|
|
|
pub mod probestack;
|