Amanieu d'Antras e6fd1b272f Bump to 0.1.39 | 3 jaren geleden | |
---|---|---|
.github | 4 jaren geleden | |
ci | 4 jaren geleden | |
crates | 6 jaren geleden | |
examples | 4 jaren geleden | |
libm @ fe396e00b7 | 4 jaren geleden | |
src | 3 jaren geleden | |
testcrate | 4 jaren geleden | |
.gitignore | 8 jaren geleden | |
.gitmodules | 5 jaren geleden | |
Cargo.toml | 3 jaren geleden | |
LICENSE.TXT | 8 jaren geleden | |
PUBLISHING.md | 5 jaren geleden | |
README.md | 5 jaren geleden | |
build.rs | 4 jaren geleden | |
thumbv6m-linux-eabi.json | 7 jaren geleden | |
thumbv7em-linux-eabi.json | 7 jaren geleden | |
thumbv7em-linux-eabihf.json | 7 jaren geleden | |
thumbv7m-linux-eabi.json | 7 jaren geleden |
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.