Amanieu d'Antras e6fd1b272f Bump to 0.1.39 | преди 3 години | |
---|---|---|
.github | преди 4 години | |
ci | преди 4 години | |
crates | преди 6 години | |
examples | преди 4 години | |
libm @ fe396e00b7 | преди 4 години | |
src | преди 3 години | |
testcrate | преди 4 години | |
.gitignore | преди 8 години | |
.gitmodules | преди 5 години | |
Cargo.toml | преди 3 години | |
LICENSE.TXT | преди 8 години | |
PUBLISHING.md | преди 5 години | |
README.md | преди 5 години | |
build.rs | преди 4 години | |
thumbv6m-linux-eabi.json | преди 7 години | |
thumbv7em-linux-eabi.json | преди 7 години | |
thumbv7em-linux-eabihf.json | преди 7 години | |
thumbv7m-linux-eabi.json | преди 7 години |
compiler-builtins
Porting
compiler-rt
intrinsics to Rust
See rust-lang/rust#35437.
If you are working with a target that doesn't have binary releases of std
available via rustup (this probably means you are building the core crate
yourself) and need compiler-rt intrinsics (i.e. you are probably getting linker
errors when building an executable: undefined reference to __aeabi_memcpy
),
you can use this crate to get those intrinsics and solve the linker errors. To
do that, add this crate somewhere in the dependency graph of the crate you are
building:
# Cargo.toml
[dependencies]
compiler_builtins = { git = "https://github.com/rust-lang/compiler-builtins" }
extern crate compiler_builtins;
// ...
If you still get an "undefined reference to $INTRINSIC" error after that change,
that means that we haven't ported $INTRINSIC
to Rust yet! Please open an
issue with the name of the intrinsic and the LLVM triple (e.g.
thumbv7m-none-eabi) of the target you are using. That way we can prioritize
porting that particular intrinsic.
If you've got a C compiler available for your target then while we implement this intrinsic you can temporarily enable a fallback to the actual compiler-rt implementation as well for unimplemented intrinsics:
[dependencies.compiler_builtins]
git = "https://github.com/rust-lang/compiler-builtins"
features = ["c"]
cargo test --features gen-tests
.== !=
) before bitwise operations (& | ^
), while Rust evaluates the other way.These builtins are needed to support 128-bit integers, which are in the process of being added to Rust.
These builtins involve floating-point types ("f128
", "f80
" and complex numbers) that are not supported by Rust.
These builtins are never called by LLVM.
Rust only exposes atomic types on platforms that support them, and therefore does not need to fall back to software implementations.
Miscellaneous functionality that is not used by Rust.
Floating-point implementations of builtins that are only called from soft-float code. It would be better to simply use the generic soft-float versions in this case.
The compiler-builtins crate is dual licensed under both the University of Illinois "BSD-Like" license and the MIT license. As a user of this code you may choose to use it under either license. As a contributor, you agree to allow your code to be used under both.
Full text of the relevant licenses is in LICENSE.TXT.