no_std compatible tester
This commit is contained in:
parent
a88ea4011b
commit
b8e8c7f693
11
Cargo.toml
11
Cargo.toml
|
@ -4,17 +4,22 @@ build = "build.rs"
|
|||
name = "compiler_builtins"
|
||||
version = "0.1.0"
|
||||
|
||||
[build-dependencies]
|
||||
rand = "0.3.15"
|
||||
|
||||
[build-dependencies.gcc]
|
||||
optional = true
|
||||
version = "0.3.36"
|
||||
|
||||
[target.'cfg(all(target_arch = "arm", not(any(target_env = "gnu", target_env = "musl")), target_os = "linux"))'.dev-dependencies]
|
||||
test = { git = "https://github.com/japaric/utest" }
|
||||
utest-cortex-m-qemu = { git = "https://github.com/japaric/utest", default-features = false }
|
||||
utest-macros = { git = "https://github.com/japaric/utest" }
|
||||
|
||||
[features]
|
||||
# Build the missing intrinsics from compiler-rt C source code
|
||||
c = ["gcc"]
|
||||
# Mark this crate as the #![compiler_builtins] crate
|
||||
compiler-builtins = []
|
||||
default = ["compiler-builtins"]
|
||||
# Include implementations of memory operations like memcpy
|
||||
mem = []
|
||||
rustbuild = ["compiler-builtins"]
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@ enum Sign {
|
|||
Positive,
|
||||
Negative
|
||||
}
|
||||
|
||||
macro_rules! fp_fix {
|
||||
($intrinsic:ident: $fty:ty, $ity:ty) => {
|
||||
pub extern "C" fn $intrinsic(f: $fty) -> $ity {
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/adddf3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/addsf3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/ashldi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/ashlti3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/ashrdi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/ashrti3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/divdi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/divmoddi4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/divmodsi4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/divsi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/divti3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/lshrdi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/lshrti3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/moddi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/modsi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/modti3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/muldi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/mulodi4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/mulosi4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/muloti4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/multi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/powidf2.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/powisf2.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/subdf3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/subsf3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/udivdi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/udivmoddi4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/udivmodsi4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/udivmodti4.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/udivsi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/udivti3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/umoddi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/umodsi3.rs"));
|
|
@ -0,0 +1,8 @@
|
|||
#![feature(compiler_builtins_lib)]
|
||||
#![feature(i128_type)]
|
||||
#![cfg_attr(all(target_arch = "arm",
|
||||
not(any(target_env = "gnu", target_env = "musl")),
|
||||
target_os = "linux",
|
||||
test), no_std)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/umodti3.rs"));
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"abi-blacklist": [
|
||||
"stdcall",
|
||||
"fastcall",
|
||||
"vectorcall",
|
||||
"win64",
|
||||
"sysv64"
|
||||
],
|
||||
"arch": "arm",
|
||||
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
|
||||
"env": "",
|
||||
"executables": true,
|
||||
"features": "+strict-align",
|
||||
"linker": "arm-none-eabi-gcc",
|
||||
"llvm-target": "thumbv6m-none-eabi",
|
||||
"max-atomic-width": 0,
|
||||
"os": "linux",
|
||||
"panic-strategy": "abort",
|
||||
"pre-link-args": ["-nostartfiles"],
|
||||
"relocation-model": "static",
|
||||
"target-endian": "little",
|
||||
"target-pointer-width": "32",
|
||||
"vendor": ""
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"abi-blacklist": [
|
||||
"stdcall",
|
||||
"fastcall",
|
||||
"vectorcall",
|
||||
"win64",
|
||||
"sysv64"
|
||||
],
|
||||
"arch": "arm",
|
||||
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
|
||||
"env": "",
|
||||
"executables": true,
|
||||
"linker": "arm-none-eabi-gcc",
|
||||
"llvm-target": "thumbv7em-none-eabi",
|
||||
"max-atomic-width": 32,
|
||||
"os": "linux",
|
||||
"panic-strategy": "abort",
|
||||
"pre-link-args": ["-nostartfiles"],
|
||||
"relocation-model": "static",
|
||||
"target-endian": "little",
|
||||
"target-pointer-width": "32",
|
||||
"vendor": ""
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"abi-blacklist": [
|
||||
"stdcall",
|
||||
"fastcall",
|
||||
"vectorcall",
|
||||
"win64",
|
||||
"sysv64"
|
||||
],
|
||||
"arch": "arm",
|
||||
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
|
||||
"env": "",
|
||||
"executables": true,
|
||||
"features": "+vfp4,+d16,+fp-only-sp",
|
||||
"linker": "arm-none-eabi-gcc",
|
||||
"llvm-target": "thumbv7em-none-eabihf",
|
||||
"max-atomic-width": 32,
|
||||
"os": "linux",
|
||||
"panic-strategy": "abort",
|
||||
"pre-link-args": ["-nostartfiles"],
|
||||
"relocation-model": "static",
|
||||
"target-endian": "little",
|
||||
"target-pointer-width": "32",
|
||||
"vendor": ""
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"abi-blacklist": [
|
||||
"stdcall",
|
||||
"fastcall",
|
||||
"vectorcall",
|
||||
"win64",
|
||||
"sysv64"
|
||||
],
|
||||
"arch": "arm",
|
||||
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
|
||||
"env": "",
|
||||
"executables": true,
|
||||
"linker": "arm-none-eabi-gcc",
|
||||
"llvm-target": "thumbv7m-none-eabi",
|
||||
"max-atomic-width": 32,
|
||||
"os": "linux",
|
||||
"panic-strategy": "abort",
|
||||
"pre-link-args": ["-nostartfiles"],
|
||||
"relocation-model": "static",
|
||||
"target-endian": "little",
|
||||
"target-pointer-width": "32",
|
||||
"vendor": ""
|
||||
}
|
Loading…
Reference in New Issue