compiler-builtins-zynq/src/lib.rs

65 lines
1.7 KiB
Rust
Raw Normal View History

2017-06-25 01:22:49 +08:00
#![cfg_attr(feature = "compiler-builtins", compiler_builtins)]
#![feature(abi_unadjusted)]
2016-08-08 04:58:05 +08:00
#![feature(asm)]
#![feature(compiler_builtins)]
2016-08-16 10:08:04 +08:00
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![feature(linkage)]
2016-08-08 04:58:05 +08:00
#![feature(naked_functions)]
2017-01-04 09:42:03 +08:00
#![feature(repr_simd)]
2016-08-14 01:16:52 +08:00
#![no_builtins]
#![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-08 04:58:05 +08:00
2016-08-13 16:51:54 +08:00
// We disable #[no_mangle] for tests so that we can verify the test results
// against the native compiler-rt implementations of the builtins.
// NOTE cfg(all(feature = "c", ..)) indicate that compiler-rt provides an arch optimized
// implementation of that intrinsic and we'll prefer to use that
// 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.
#[cfg(test)]
extern crate core;
fn abort() -> ! {
unsafe { core::intrinsics::abort() }
}
#[macro_use]
mod macros;
2016-08-18 04:51:37 +08:00
pub mod float;
2019-05-15 05:33:08 +08:00
pub mod int;
2019-05-15 05:33:08 +08:00
#[cfg(any(
all(target_arch = "wasm32", target_os = "unknown"),
all(target_arch = "arm", target_os = "none"),
all(target_vendor = "fortanix", target_env = "sgx")
))]
pub mod math;
pub mod mem;
2016-08-08 04:58:05 +08:00
#[cfg(target_arch = "arm")]
pub mod arm;
#[cfg(all(kernel_user_helpers, target_os = "linux", target_arch = "arm"))]
pub mod arm_linux;
2018-07-27 01:30:26 +08:00
#[cfg(any(target_arch = "riscv32"))]
pub mod riscv32;
2017-09-16 06:18:54 +08:00
#[cfg(target_arch = "x86")]
pub mod x86;
2016-08-17 06:46:46 +08:00
#[cfg(target_arch = "x86_64")]
pub mod x86_64;
pub mod probestack;