Browse Source

no_std compatible tester

master
Jorge Aparicio 5 years ago
parent
commit
b8e8c7f693
  1. 11
      Cargo.toml
  2. 2508
      build.rs
  3. 1
      src/float/conv.rs
  4. 8
      tests/adddf3.rs
  5. 8
      tests/addsf3.rs
  6. 8
      tests/ashldi3.rs
  7. 8
      tests/ashlti3.rs
  8. 8
      tests/ashrdi3.rs
  9. 8
      tests/ashrti3.rs
  10. 8
      tests/divdi3.rs
  11. 8
      tests/divmoddi4.rs
  12. 8
      tests/divmodsi4.rs
  13. 8
      tests/divsi3.rs
  14. 8
      tests/divti3.rs
  15. 8
      tests/lshrdi3.rs
  16. 8
      tests/lshrti3.rs
  17. 8
      tests/moddi3.rs
  18. 8
      tests/modsi3.rs
  19. 8
      tests/modti3.rs
  20. 8
      tests/muldi3.rs
  21. 8
      tests/mulodi4.rs
  22. 8
      tests/mulosi4.rs
  23. 8
      tests/muloti4.rs
  24. 8
      tests/multi3.rs
  25. 8
      tests/powidf2.rs
  26. 8
      tests/powisf2.rs
  27. 8
      tests/subdf3.rs
  28. 8
      tests/subsf3.rs
  29. 8
      tests/udivdi3.rs
  30. 8
      tests/udivmoddi4.rs
  31. 8
      tests/udivmodsi4.rs
  32. 8
      tests/udivmodti4.rs
  33. 8
      tests/udivsi3.rs
  34. 8
      tests/udivti3.rs
  35. 8
      tests/umoddi3.rs
  36. 8
      tests/umodsi3.rs
  37. 8
      tests/umodti3.rs
  38. 24
      thumbv6m-linux-eabi.json
  39. 23
      thumbv7em-linux-eabi.json
  40. 24
      thumbv7em-linux-eabihf.json
  41. 23
      thumbv7m-linux-eabi.json

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

2508
build.rs
File diff suppressed because it is too large
View File

1
src/float/conv.rs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

24
thumbv7em-linux-eabihf.json

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

@ -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…
Cancel
Save