]> git.proxmox.com Git - rustc.git/blob - src/libcompiler_builtins/src/lib.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / libcompiler_builtins / src / lib.rs
1 #![cfg_attr(not(stage0), deny(warnings))]
2 #![cfg_attr(not(test), no_std)]
3 #![cfg_attr(feature = "compiler-builtins", compiler_builtins)]
4 #![crate_name = "compiler_builtins"]
5 #![crate_type = "rlib"]
6 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
7 html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
8 html_root_url = "https://doc.rust-lang.org/nightly/",
9 html_playground_url = "https://play.rust-lang.org/",
10 test(attr(deny(warnings))))]
11 #![feature(asm)]
12 #![feature(compiler_builtins)]
13 #![feature(core_intrinsics)]
14 #![feature(naked_functions)]
15 #![feature(staged_api)]
16 #![feature(i128_type)]
17 #![feature(repr_simd)]
18 #![feature(abi_unadjusted)]
19 #![feature(linkage)]
20 #![allow(unused_features)]
21 #![no_builtins]
22 #![unstable(feature = "compiler_builtins_lib",
23 reason = "Compiler builtins. Will never become stable.",
24 issue = "0")]
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 fn abort() -> ! {
40 unsafe { core::intrinsics::abort() }
41 }
42
43 #[macro_use]
44 mod macros;
45
46 pub mod int;
47 pub mod float;
48
49 pub mod mem;
50
51 #[cfg(target_arch = "arm")]
52 pub mod arm;
53
54 #[cfg(all(armv5te, target_os = "linux", target_arch = "arm"))]
55 pub mod arm_linux;
56
57 #[cfg(target_arch = "x86")]
58 pub mod x86;
59
60 #[cfg(target_arch = "x86_64")]
61 pub mod x86_64;
62
63 pub mod probestack;