no_std compatible tester

This commit is contained in:
Jorge Aparicio 2017-04-10 14:38:17 -05:00
parent a88ea4011b
commit b8e8c7f693
41 changed files with 2883 additions and 3 deletions

View File

@ -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"]

2508
build.rs

File diff suppressed because it is too large Load Diff

View File

@ -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 {

8
tests/adddf3.rs Normal file
View File

@ -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"));

8
tests/addsf3.rs Normal file
View File

@ -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"));

8
tests/ashldi3.rs Normal file
View File

@ -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"));

8
tests/ashlti3.rs Normal file
View File

@ -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"));

8
tests/ashrdi3.rs Normal file
View File

@ -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"));

8
tests/ashrti3.rs Normal file
View File

@ -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"));

8
tests/divdi3.rs Normal file
View File

@ -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"));

8
tests/divmoddi4.rs Normal file
View File

@ -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"));

8
tests/divmodsi4.rs Normal file
View File

@ -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"));

8
tests/divsi3.rs Normal file
View File

@ -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"));

8
tests/divti3.rs Normal file
View File

@ -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"));

8
tests/lshrdi3.rs Normal file
View File

@ -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"));

8
tests/lshrti3.rs Normal file
View File

@ -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"));

8
tests/moddi3.rs Normal file
View File

@ -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"));

8
tests/modsi3.rs Normal file
View File

@ -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"));

8
tests/modti3.rs Normal file
View File

@ -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"));

8
tests/muldi3.rs Normal file
View File

@ -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"));

8
tests/mulodi4.rs Normal file
View File

@ -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"));

8
tests/mulosi4.rs Normal file
View File

@ -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"));

8
tests/muloti4.rs Normal file
View File

@ -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"));

8
tests/multi3.rs Normal file
View File

@ -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"));

8
tests/powidf2.rs Normal file
View File

@ -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"));

8
tests/powisf2.rs Normal file
View File

@ -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"));

8
tests/subdf3.rs Normal file
View File

@ -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"));

8
tests/subsf3.rs Normal file
View File

@ -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"));

8
tests/udivdi3.rs Normal file
View File

@ -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"));

8
tests/udivmoddi4.rs Normal file
View File

@ -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"));

8
tests/udivmodsi4.rs Normal file
View File

@ -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"));

8
tests/udivmodti4.rs Normal file
View File

@ -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"));

8
tests/udivsi3.rs Normal file
View File

@ -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"));

8
tests/udivti3.rs Normal file
View File

@ -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"));

8
tests/umoddi3.rs Normal file
View File

@ -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"));

8
tests/umodsi3.rs Normal file
View File

@ -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"));

8
tests/umodti3.rs Normal file
View File

@ -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"));

24
thumbv6m-linux-eabi.json Normal file
View File

@ -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": ""
}

23
thumbv7em-linux-eabi.json Normal file
View File

@ -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": ""
}

View File

@ -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": ""
}

23
thumbv7m-linux-eabi.json Normal file
View File

@ -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": ""
}