lib.rs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. // We disable #[no_mangle] for tests so that we can verify the test results
  26. // against the native compiler-rt implementations of the builtins.
  27. // NOTE cfg(all(feature = "c", ..)) indicate that compiler-rt provides an arch optimized
  28. // implementation of that intrinsic and we'll prefer to use that
  29. // NOTE(aapcs, aeabi, arm) ARM targets use intrinsics named __aeabi_* instead of the intrinsics
  30. // that follow "x86 naming convention" (e.g. addsf3). Those aeabi intrinsics must adhere to the
  31. // AAPCS calling convention (`extern "aapcs"`) because that's how LLVM will call them.
  32. #[cfg(test)]
  33. extern crate core;
  34. fn abort() -> ! {
  35. unsafe { core::intrinsics::abort() }
  36. }
  37. #[macro_use]
  38. mod macros;
  39. pub mod int;
  40. pub mod float;
  41. pub mod mem;
  42. #[cfg(target_arch = "arm")]
  43. pub mod arm;
  44. #[cfg(target_arch = "x86_64")]
  45. pub mod x86_64;
  46. pub mod probestack;