Commit Graph

589 Commits

Author SHA1 Message Date
Alex Crichton
13d1c5ce18 Remove executable bit from mod.rs 2017-06-22 22:04:40 -07:00
Alex Crichton
bd4a416457 Use traits instead of macros for shift intrinsics
This is an attempt to tidy up the definition of intrinsics by making them more
rust-like at the definition site and using traits instead of macros for the
definition. Additionally the helper macro, `intrinsics!`, now fills in a
definition for #[cfg]'d off intrinsics when compiling with C code
2017-06-22 22:03:07 -07:00
Alex Crichton
0f2515b715 Test with the 'c' feature enabled on CI 2017-06-22 14:32:16 -07:00
Jorge Aparicio
1b379a495d remove unused macros
to fix warnings
2017-06-01 07:40:50 -05:00
est31
4c69bfaff4 Build.rs: better debug output 2017-05-10 02:41:29 +02:00
est31
915c2fd0d3 Fix overflow bug when creating the absolute value
Previously, the tests failed on some platforms due to it.
2017-05-08 04:30:48 +02:00
est31
6eeab2e62f floattidf, floatuntidf: ignore differences smaller than 2 in test
Its possible that the generated f64 is different from the expected one
by one bit. This is legal when both values are equally close to the i128/u128.
2017-05-08 01:26:30 +02:00
est31
ddc95ea11c Update cast to 0.2.2 to fix bug in debug mode 2017-05-08 00:05:00 +02:00
est31
197b7e6d97 Print generated files 2017-05-07 04:40:00 +02:00
est31
31048e53b5 Fix test name gotten wrong 2017-05-06 15:47:38 +02:00
est31
2aaaa38e25 Mark the functions just implemented in README.md 2017-05-06 15:47:38 +02:00
est31
313d3bb49f Adjust for changed cast function 2017-05-06 15:47:38 +02:00
est31
ee6be10895 Implement tests for floatuntidf and floatuntisf 2017-05-06 05:37:24 +02:00
est31
273211c01b Implement tests for fixunsdfti and fixunssfti 2017-05-06 05:37:24 +02:00
est31
390e1e99c9 Implement tests for fixdfti and fixsfti 2017-05-06 05:37:24 +02:00
est31
7e07245411 Implement tests for floattidf and floattisf 2017-05-06 05:37:24 +02:00
est31
c8b5bb756c Use cast 0.2.1 for i128 support 2017-05-06 05:37:24 +02:00
est31
7e5af82760 Add i128 <-> float conversion functions 2017-05-06 02:22:54 +02:00
est31
21db51b3f8 Mark some float related intrinsics as implemented in README.md
They have been implemented since
2017-05-06 00:42:59 +02:00
est31
3254005570 Rename float conversion macros to something nicer 2017-05-05 23:31:41 +02:00
Jorge Aparicio
8dad658a6b move intrinsics test from src/bin to examples
with this change the libc crate is not required when calling `cargo build -p
compiler-builtins`
2017-04-11 17:09:05 -05:00
Jorge Aparicio
0666ed145a fix cfg syntax 2017-04-11 15:36:42 -05:00
Jorge Aparicio
05b6e8fa6c ignore i128 tests on windows
see #158
2017-04-11 15:08:52 -05:00
Jorge Aparicio
1e48efeaef Revert "i128 test: transmute intrinsic output before comparing"
This reverts commit 46085a2313ba196e3aab85a3380a07c6bd838fda.
2017-04-11 15:03:21 -05:00
Jorge Aparicio
3043cf860c powershell -> cmd.exe 2017-04-11 14:53:19 -05:00
Jorge Aparicio
5b8965c9de i128 test: transmute intrinsic output before comparing
on Windows, these intrinsics return a U64x2 type because of ABI requirements
2017-04-11 14:47:23 -05:00
Jorge Aparicio
4de2ff7b9d appveyor: make the host x86_64 when testing the i686 target 2017-04-11 14:28:31 -05:00
Jorge Aparicio
692906c58a adapt the thumb target specs to upstream linker-flavor changes 2017-04-11 11:32:44 -05:00
Jorge Aparicio
2f64ef0870 ignore i128 div / mul tests on MIPS
there's an unfixed bug. See #137
2017-04-11 11:24:33 -05:00
Jorge Aparicio
f80b2c4af2 s/feature/features/g 2017-04-10 20:10:45 -05:00
Jorge Aparicio
09f95517b1 travis: don't reinstall rustup
travis now installs rust using rustup
2017-04-10 18:00:16 -05:00
Jorge Aparicio
a606075c9b .travis.yml: thumbs target have been renamed 2017-04-10 17:59:45 -05:00
Jorge Aparicio
750b26267f appveyor: cargo test requires the gen-tests feature 2017-04-10 17:46:33 -05:00
Jorge Aparicio
9c0fe5be3d put test generation behind a Cargo feature
to reduce build time for the most common case of not running tests
2017-04-10 17:27:25 -05:00
Jorge Aparicio
d8576a4f8b modify the CI setup to run tests on the thumb targets 2017-04-10 17:16:13 -05:00
Jorge Aparicio
74eedd0f17 make float* intrinsics testable on thumb
there are no intrinsics for float equality atm, so transmute to an integer
before comparing
2017-04-10 17:13:07 -05:00
Jorge Aparicio
0869e5b93a remove arm tests from the old test suite 2017-04-10 16:35:08 -05:00
Jorge Aparicio
62091bb124 test float/conv.rs 2017-04-10 16:12:49 -05:00
Jorge Aparicio
af0d6847d7 no_std compatible tester 2017-04-10 14:38:17 -05:00
Jorge Aparicio
447ebe4f91 rustfmt 2017-04-10 11:29:31 -05:00
Jorge Aparicio
dfc1a7d814 move the compiler-rt submodule to the root 2017-04-10 11:23:03 -05:00
Jorge Aparicio
5b2585403d remove unused Cargo subprojects 2017-04-10 11:22:17 -05:00
Jorge Aparicio
199c7a8dcb refactor build.rs to not depend on rustc-cfg
it now uses the CARGO_CFG_TARGET variables provided by Cargo
2017-04-10 11:19:16 -05:00
Jorge Aparicio
05a5f4681f remove the current test suite 2017-04-10 11:14:05 -05:00
Jorge Aparicio
8316333dc6 move compiler-rt submodule 2017-04-10 11:11:23 -05:00
bors
95a216c6bf Auto merge of #147 - rust-lang-nursery:conv, r=japaric
Conversion from&to float<->integer

this is a rebased version of #139

cc @ithinuel
2017-04-08 15:20:35 +00:00
Jorge Aparicio
07064c2239 test out of range condition using f64
to avoid imprecision due to rounding to f32
2017-04-08 10:18:19 -05:00
Jorge Aparicio
0ef737f557 fix debug assertion in modsi3 / moddi3
fixes #151
this fix is very similar to #149
2017-03-13 20:40:44 -05:00
bors
42c4a1e5f2 Auto merge of #149 - rust-lang-nursery:gh148, r=alexcrichton
fix debug assertion in divdi3

fixes #148

r? @alexcrichton
2017-03-07 00:38:33 +00:00
Jorge Aparicio
74c6b91677 fix debug assertion in divdi3
fixes #148
2017-03-06 17:46:11 -05:00
Jorge Aparicio
0ecfe751b5 fix quickcheck tests
the check! macro syntax has changed
2017-03-06 12:17:41 -05:00
Jorge Aparicio
1f26fea5d4 refactor 'impl Int' 2017-03-06 12:17:10 -05:00
Wilfried Chauveau
77889226f7 exclude from tests values out of integer range (and NaN). 2017-03-06 11:56:52 -05:00
Wilfried Chauveau
ef3de28eaf implement float/double to (u)int conversion. 2017-03-06 11:56:52 -05:00
Wilfried Chauveau
b3e33508a0 impl (unsigned/signed) int to single/double precision float conversion based on llvm algorithms. 2017-03-06 11:55:57 -05:00
Jorge Aparicio
cd96f53050 fix infinite recursion in divmoddi4 / mulodi4
on ARMv7-M processors, divmoddi4 was calling mulodi4 and mulodi4 was calling
divmoddi4 leading to infinite recursion. This commit breaks the cycle by using
wrapping multiplication in divmoddi4.

fixes #145
2017-03-06 10:38:19 -05:00
Jorge Aparicio
f96c8b8250 make the gcc crate optional
it's only required when the "c" feature is enabled
2017-02-19 15:49:59 -05:00
Jorge Aparicio
9916fa670c implement float subtraction
as a + (-b)
2017-02-08 10:10:40 -05:00
Jorge Aparicio
0dfe91f7cf adjust the check! macro to accept AAPCS intrinsics 2017-02-07 23:07:51 -05:00
Jorge Aparicio
57deccf6de ARM: keep some non-aeabi symbols around
- multi3: there's no aeabi equivalent
- divmod{s,d}i4: these are directly called by __aeabi_{l,i}divmod
- add{s,d}f3: required by the C sub{s,d}f3 implementation

but make sure they also use the AAPCS calling convention
2017-02-07 14:28:02 -05:00
Jorge Aparicio
3a4e6ce2f4 use AAPCS calling convention on all aeabi intrinsics
also, on ARM, inline(always) the actual implementation of the intrinsics so we
end with code like this:

```
00000000 <__aeabi_dadd>:
    (implementation here)
```

instead of "trampolines" like this:

```
00000000 <__aeabi_dadd>:
    (shuffle registers)
    (call __adddf3)

00000000 <__adddf3>:
    (implementation here)
```

closes #116
2017-02-07 09:41:26 -05:00
Jorge Aparicio
c261f82cab target.contains -> target_os == 2017-02-06 15:16:16 -05:00
Jorge Aparicio
ee172768d2 std: Remove unused objects from compiler-builtins
rust-lang/rust#38623
2017-02-06 15:13:40 -05:00
Jorge Aparicio
263f16a81b travis: Expand the cross linux image
rust-lang/rust#39111
2017-02-06 15:12:34 -05:00
Jorge Aparicio
bdb136a50e libcompiler_builtins: Don't build emutls.c
Rather than improving the check, let's ditch emutls.c entirely.

rust-lang/rust#38877
2017-02-06 15:11:51 -05:00
Jorge Aparicio
2c7368702b Don't build any native compiler-builtin components for emscripten
rust-lang/rust#36339
2017-02-06 15:11:09 -05:00
Jorge Aparicio
a13d0e2b13 Don't build gcc_personality_v0.c on NetBSD either
rust-lang/rust#39425
2017-02-06 15:10:02 -05:00
bors
e1fb75d02e Auto merge of #133 - est31:i128, r=japaric
i128 intrinsics

Adds i128 intrinsics.

Note that this PR doesn't do float intrinsics, due to the missing presence of macros, those are however still required in order for rustc to switch to this crate.
2017-02-04 13:22:51 +00:00
est31
70bda6dd1c Disable quickcheck tests on mips
Two reasons:
    * the C versions __divti3 and __modti3 are apparently broken,
      at least when used in quickcheck. They change their own arguments.
    * compiler_rt's support for mips is disabled already on clang [1].
      Its desireable to support working "cargo test" on that compiler
      as well, and not greet the tester with linker errors.

[1]: http://llvm.org/viewvc/llvm-project?view=revision&revision=224488
2017-02-04 12:23:45 +01:00
Jorge Aparicio
48ef4907b3 add rebuild logic to compiler-rt-cdylib
fixes #136
2017-02-03 20:00:24 -05:00
est31
a01ee168c4 Panic when invalid overflow value is returned 2017-02-04 01:39:19 +01:00
est31
f15bf972bd Add quickcheck tests 2017-02-03 23:46:15 +01:00
est31
aeda7382d7 Add newly implemented intrinsics to test file 2017-02-03 01:51:46 +01:00
est31
b1561fc195 u128 sdiv intrinsics 2017-02-02 22:13:28 +01:00
est31
37a62269dc u128 udiv intrinsics 2017-02-02 22:11:14 +01:00
est31
9fd610d859 Macro-ify udivmod 2017-02-02 22:03:42 +01:00
est31
a38eee9ea1 i128 shift intrinsics 2017-02-02 22:02:51 +01:00
est31
19700fb03d i128 mul intrinsics 2017-02-02 21:36:56 +01:00
est31
8bb1010d51 int module: macro-ify trait impls and add {u,i}128 support 2017-02-02 21:36:02 +01:00
est31
b6e0dd2bf2 Add i128 to lib.rs as feature 2017-02-02 21:27:11 +01:00
Jorge Aparicio
e6bb6db8eb fix the build
the unused macro_use crate lint has tightened; fix the new warnings
2017-01-26 16:17:23 -05:00
James Duley
da48de4601 mul.rs: use wrapping_mul not plain
rustc in debug mode with a plain multiplication will call @llvm.umul.with.overflow.* which may call the builtin resulting in infinite recursion.
2017-01-02 22:57:38 +13:00
Jorge Aparicio
acbca64291 more #[no_mangle] 2016-12-31 10:04:40 -05:00
Jorge Aparicio
3ed64e2b50 CI: use a recent nightly
- add #[no_mangle] to the panic_fmt lang item to adjust to changes in
the visibility algorithm

- adjust to changes in the layout of Cargo's target directory

- use a newer Xargo to reduce the build time of the sysroot (only core
is compiled as part of the sysroot now)
2016-12-31 10:04:40 -05:00
Jorge Aparicio
af00bd1198 bump rustc-cfg dependency to v0.3.0
the older no longer works with recent nightlies as target_family
disappeared from `rustc --print cfg`'s output
2016-12-30 21:56:29 -05:00
Vadzim Dambrouski
a2671118ae Fix memset arguments for MSP430 target.
On MSP430 second argument to memset has i16 type instead of i32.
2016-12-19 05:31:20 +03:00
Jorge Aparicio
b8d6652035 add implementations of memcpy et al
behind the "mem" Cargo feature, which used to be named "weak"

fixes #126
2016-12-17 23:06:37 -05:00
bors
9d3cfedce6 Auto merge of #124 - japaric:rustbuild, r=alexcrichton
by default, mark this crate as the #![compiler_builtins] crate

as this is how most users will want to use this crate

r? @alexcrichton
2016-12-13 00:02:56 +00:00
Jorge Aparicio
45ebf21c0b fix appveyor 2016-12-11 16:54:41 -05:00
Jorge Aparicio
6da988a43a by default, mark this crate as the #![compiler_builtins] crate
as this is how most users will want to use this crate
2016-12-11 16:18:43 -05:00
Jorge Aparicio
b90b5107a7 don't set SSL_CERT_FILE for OSX 2016-12-11 15:26:18 -05:00
Jorge Aparicio
fc81b547e6 work around rust-lang/cargo#3340 2016-12-11 14:58:05 -05:00
Jorge Aparicio
8a415ef044 pin all the targets to nightly-2016-12-05 2016-12-11 11:33:21 -05:00
Jorge Aparicio
0abb6e20e6 fix the test suite for the thumb targets 2016-12-11 11:18:48 -05:00
Alex Crichton
fc4b0a07bb Merge pull request #120 from japaric/xargo-up
CI: use Xargo 0.2.x
2016-11-23 22:41:12 -06:00
Jorge Aparicio
42b4300d36 CI: use Xargo 0.2.x
this version uses the rust-src component that rustup installs instead
of fetching the source tarball from static.r-l.o, which sometimes went
wrong due to the fallible logic that Xargo 0.1.x used
2016-11-23 12:47:42 -05:00
Alex Crichton
865ed6f133 Define VISIBILITY_HIDDEN when compiling objects
Apparently compiler-rt passed this and we just forgot to. Fixes visibility of
some symbols on 32-bit Linux.
2016-11-18 09:40:20 -08:00
Alex Crichton
1a611e584f Merge pull request #118 from japaric/compiler-rt-up
update the compiler-rt submodule
2016-11-17 09:46:16 -06:00
Jorge Aparicio
03e9f74fb8 update the compiler-rt submodule
to pick up the fixes for rust-lang/rust#37559 and rust-lang/rust#37630
2016-11-16 14:34:26 -05:00
Jorge Aparicio
c6ac7a35a4 Merge pull request #117 from mattico/fix-docker-apt-404
Fix apt 404s in Docker
2016-11-13 10:43:06 -05:00
Jorge Aparicio
a5d8d0d9f5 merge apt-get commands 2016-11-12 17:36:59 -05:00
Matt Ickstadt
2c99644aa7 Fix apt 404s in Docker
`apt update` and `apt install` should be in the same Docker RUN statement, otherwise `apt update` will be cached and `apt install` will 404 if a package no longer exists.
2016-11-12 16:08:13 -06:00
Matt Ickstadt
430c92cc9a Use better cfg name for arm-linux tests 2016-11-12 15:52:59 -06:00
Matt Ickstadt
94c0d475bc Use correct lib name in qc test failure 2016-11-12 15:30:57 -06:00
Matt Ickstadt
9b4553de1c Add float quickcheck 2016-11-12 14:55:28 -06:00
bors
c3b663f866 Auto merge of #113 - japaric:readme-up, r=alexcrichton
mention that 'extern crate compiler_builtins' must be used

in some crate that's part of the dependency graph of the crate one's
building.

r? @alexcrichton
2016-10-19 12:13:29 -07:00
bors
8d1f506e65 Auto merge of #105 - japaric:mips64, r=japaric
test the mips64 targets

These should be all the required changes I think but libloading can't be cross compiled for these new targets:

```
error: failed to run custom build command for `libloading v0.3.1`
process didn't exit successfully: `/target/debug/build/libloading-07147fe7fffab0b2/build-script-build`(exit code: 101)
--- stderr
thread 'main' panicked at 'could not get target info: TargetNotFound', ../src/libcore/result.rs:799
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

I've openend nagisa/rust_libloading#19 to track that. Wel'll have to wait until that's fixed.

cc @alexcrichton
2016-10-19 09:30:10 -07:00
Jorge Aparicio
1074677eb0 mention that 'extern crate compiler_builtins' must be used
in some crate that's part of the dependency graph of the crate one's
building.
2016-10-19 11:25:16 -05:00
bors
17628ad28a Auto merge of #108 - Phaiax:gccdeptogit, r=japaric
Temporary use gcc-rs from git until new version released
2016-10-16 10:58:28 -07:00
Christopher Serr
53c19053e4 Fix a few clippy warnings 2016-10-16 13:53:31 +02:00
Phaiax
7ecc55fbef Update gcc-rs dependency to 0.3.36 2016-10-16 07:54:59 +02:00
Phaiax
f511f67752 Fix url in readme 2016-10-15 19:21:23 +02:00
bors
7ccece0694 Auto merge of #104 - alexcrichton:more-readme-updates, r=japaric
More readme updates
2016-10-14 19:26:46 -07:00
Jorge Aparicio
533c78afaf test the mips64 targets 2016-10-14 20:26:59 -05:00
Jorge Aparicio
04639c2f54 update the title as well 2016-10-14 19:59:00 -05:00
bors
3c4326f51f Auto merge of #103 - alexcrichton:update-ci, r=japaric
Update CI configs

* Run on the master branch (to get previews)
* Pass --target on AppVeyor (oops)
* Use the current nightly for arm (I think that bug is fixed)
2016-10-14 17:56:26 -07:00
Alex Crichton
b92c6caa06 More small updates to the README 2016-10-14 15:50:50 -07:00
Alex Crichton
7f70040462 Update CI configs
* Run on the master branch (to get previews)
* Pass --target on AppVeyor (oops)
* Use the current nightly for arm (I think that bug is fixed)
2016-10-14 11:58:40 -07:00
Alex Crichton
8ab8bd7889 Update webhook url 2016-10-14 11:44:45 -07:00
Jorge Aparicio
ab4d5e62fb fix the powerpc64le target
by selecting a CPU that's compatible with the instructions that `rustc`
generates
2016-10-14 09:59:21 -05:00
Jorge Aparicio
b4f4913e6b README: remove the Contribution sub-section
which still referred to the Apache-2 license and is now deprecated by
the updated License section

cc @brson
2016-10-13 20:51:50 -05:00
Brian Anderson
7928431aea Correct the license to that of upstream compiler-rt
As this is a derivative work we must maintain the same license terms.
2016-10-12 17:50:39 +00:00
Jorge Aparicio
fcb19597cf ci/run.sh: remove debug stuff 2016-10-10 20:53:21 -05:00
Jorge Aparicio
77b5865b04 fix more warnings 2016-10-10 20:21:11 -05:00
Jorge Aparicio
3fe4f1c687 fix warnings 2016-10-10 19:45:34 -05:00
Jorge Aparicio
14c32a0369 rename to compiler_builtins, add rust-lang/rust-ish crate attributes 2016-10-10 19:05:21 -05:00
Jorge Aparicio
622a760d91 add the compiler_builtins feature to src/lib.rs 2016-10-10 16:45:24 -05:00
Jorge Aparicio
5f5c973cbe set crate_name and crate_type in src/lib.rs 2016-10-10 16:43:38 -05:00
Jorge Aparicio
8692e64db9 add a rustbuild cargo feature for integration with rust-lang/rust 2016-10-10 16:18:18 -05:00
Jorge Aparicio
2056d001cf use test::black_box instead of ptr::*_volatile
both prevent LLVM from optimizing away the intrinsics but the former
doesn't produce an `intrinsics` binary that segfaults
2016-10-07 18:26:21 -05:00
Jorge Aparicio
d05514cb20 fix unsafe warnings 2016-10-07 18:19:40 -05:00
Jorge Aparicio
a02ecc8eef get profile.dev (-debug-assertions) + LTO working 2016-10-07 18:19:40 -05:00
Jorge Aparicio
c9e3feb5e3 insert more abort() calls where division by zero may occur 2016-10-07 18:19:40 -05:00
Jorge Aparicio
fbf1cc0b75 check that we don't have any call to panic in our implementations 2016-10-07 18:19:40 -05:00
Jorge Aparicio
9f4632c829 panic! -> abort
closes #79
2016-10-07 18:19:40 -05:00
Jorge Aparicio
b0b7453ea3 fix path to .rlib on OSX 2016-10-07 15:03:22 -05:00
Jorge Aparicio
3911f49990 run the full test suite on osx 2016-10-07 12:03:59 -05:00
Jorge Aparicio
92734e88ff pass -nostartfiles to the linker 2016-10-07 07:13:55 -05:00
Jorge Aparicio
dbd5f05f31 drop the target files 2016-10-06 23:20:09 -05:00
Jorge Aparicio
b2b40931c6 switch back to old nightly for the arm-gnueabi target 2016-10-05 22:13:55 -05:00
Jorge Aparicio
b56315e9a7 switch to a current nightly 2016-10-05 21:34:16 -05:00
Jorge Aparicio
fcc7ca7f80 switch compiler-rt to rust-lang's fork
this fork has been patched against the UB in floatsidf and floasisf
closes #85
2016-10-03 23:26:49 -05:00
homunkulus
ba8c6a4b1d Auto merge of #82 - mattico:add_pow, r=japaric
Add pow functions

I still want to clean up the commit history, but otherwise I think this is complete. ~~Can you run the tests on it?~~
2016-10-04 01:52:27 +00:00
Jorge Aparicio
d0c93bef1b stop compiling compiler-rt implementations
to avoid duplicate symbols
2016-10-03 20:52:14 -05:00
Jorge Aparicio
27adb57c40 fix duplicate symbol test 2016-10-03 20:20:23 -05:00
Jorge Aparicio
4e7d7c7cd8 bump rustc-cfg version and show a better error message when it fails 2016-10-03 19:25:32 -05:00
Matt Ickstadt
e6bc8007dd Implement powi_f2 2016-10-03 11:20:42 -05:00
homunkulus
ea068e2370 Auto merge of #86 - mattico:multitester, r=japaric
Initial implementation of multitester

Implements part of #72.

I wanted to work on this first because it should help me find the problem in the add implementation.

Test failures now look like this:
```
__addsf3 - Args: 1 1264853201
  rustc-builtins: Some(0)
  compiler_rt:    Some(14950609)
  gcc_s:          None
__addsf3 - Args: 1 632426600
  rustc-builtins: Some(0)
  compiler_rt:    Some(0.00000000000000030889195)
  gcc_s:          None
__addsf3 - Args: 1 316213300
  rustc-builtins: Some(0)
  compiler_rt:    Some(0.0000000000000000000000000013696648)
  gcc_s:          None

[snip]

thread 'float::add::tests::_test::__addsf3' panicked at '[quickcheck] TEST FAILED. Arguments: (1, 1)', /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.3.1/src/tester.rs:118
```

It currently prints all of the errors, if that's undesirable we'd need to remove the shrinkers or modify quickcheck.
2016-10-03 06:58:30 +00:00
Jorge Aparicio
e4997a2026 hide the thumbv* target files
due to how Cargo works, the rustc-cfg in build.rs was picking our target
specifications rather than the one the user meant to use. Placing our
target files in any place other than the root of the Cargo project
avoids the issue.
2016-10-02 19:23:54 -05:00
Matt Ickstadt
ab4e4bfd71 Initial implementation of multitester 2016-10-02 14:38:40 -05:00
Jorge Aparicio
dd34b80ea0 pick target during Xargo installation 2016-09-30 20:41:59 -05:00
Jorge Aparicio
20926bc1fd give Xargo a $HOME 2016-09-30 20:21:15 -05:00
Jorge Aparicio
9b1c06948d fix Xargo installation 2016-09-30 20:20:15 -05:00
Jorge Aparicio
cea4ff6d25 add back the mysterious apt-get install qemu-user-static 2016-09-30 20:08:29 -05:00
Jorge Aparicio
7009fd238d Revert "Merge pull request #48 from mattico/add_float_quickcheck"
This reverts commit e34a6058df470e5b3d187c947ac41a294994c414, reversing
changes made to cab88e6133b0db9c6663ffd8b2f65cb35e8a9dda.
2016-09-30 19:12:17 -05:00
Jorge Aparicio
0864c9d6a2 fix nm call
the prefix was missing a '-', i.e. arm-linux-gnueabinm was being called.
This also sets -e in run.sh to catch this sort of errors.
2016-09-30 19:04:48 -05:00
Jorge Aparicio
915c2b52a9 Merge pull request #81 from japaric/cache
cache Cargo artifacts
2016-09-30 19:00:06 -05:00
Jorge Aparicio
d44e127053 use docker run --user instead of manually creating a user 2016-09-30 18:37:41 -05:00
Jorge Aparicio
f707dda057 /home/travis -> $HOME 2016-09-30 18:25:40 -05:00
Jorge Aparicio
9e1f8322e5 do chmod jut before the script phase ends 2016-09-30 18:09:52 -05:00
Jorge Aparicio
92204dce54 cache Cargo artifacts
notable changes in the docker-based testing infrastructure

- the docker containers can now modify $CARGO_HOME, to re-use the outer
  Cargo registry, and the target directory to re-use build artifacts.

- the docker containers are removed when their execution finishes
  because it's no longer necessary to re-start them to inspect them
  because all the interesting output is in the outer target directory
2016-09-30 17:39:36 -05:00
Matt Ickstadt
43d85fa5cb Add Quickcheck types for float tests 2016-09-30 14:29:52 -05:00
Matt Ickstadt
ca01aa45ff Cleanup add builtin assignments 2016-09-30 14:29:52 -05:00
Matt Ickstadt
fde45da332 Add floating point deconstruction helpers 2016-09-30 14:29:52 -05:00
Jorge Aparicio
eeaaebc9ac only x86-ish targets can use an unprefixed nm 2016-09-30 13:57:06 -05:00
Jorge Aparicio
9a9f025347 build.rs: print rerun-if-change for all the C/asm sources 2016-09-29 19:45:59 -05:00
Jorge Aparicio
148ac030d4 ignore duplicated get_pc_thunk symbols 2016-09-29 19:20:34 -05:00
Jorge Aparicio
a57a63fe08 adapt to new testing infrastructure 2016-09-29 18:50:04 -05:00
Jorge Aparicio
cb9b1f82e3 add an opt-in cargo feature to build intrinsics from compiler-rt source
closes #63
cc #66
2016-09-29 16:06:24 -05:00
Jorge Aparicio
df0eb9981e appveyor: stop gisting the disassembly
it's flaky in its current form and Travis is not producing gist either.
2016-09-29 06:43:25 -05:00
Alex Crichton
e7c804a9b0 Expand and refactor teting infrastructure
This commit moves over most of the testing infrastructure to in-tree docker
images that are all dispatched to from Travis (no other test configuration).
This allows versioning modifications to the test infrastructure as well as the
code itself. Additionally separate docker images allows for easy modification of
one without worrying about tampering of others as well as easy addition of new
targets by simply adding a new `Dockerfile`.

Additionally this commit bundles the master version of the `compiler-rt` source
repository from `llvm-mirror/compiler-rt` to test against. The compiler-rt
library itself is compiled as a `cdylib` which is then dynamically located at
runtime and we look for symbols in. There's a few hoops here, but they currently
get the job done.

All tests now execute against both gcc_s and compiler-rt, and this
testing strategy is now all hidden behind a macro as well (refactoring
all existing tests along the way).
2016-09-28 22:09:55 -07:00
homunkulus
10146b3334 Auto merge of #73 - japaric:weak, r=japaric
put weak mem* symbols behind an opt-in Cargo feature

closes #64
cc #66
2016-09-22 23:59:48 +00:00
Jorge Aparicio
2dc91bd96c put weak mem* symbols behind an opt-in Cargo feature
closes #64
cc #66
2016-09-22 18:02:25 -05:00
homunkulus
bc07830e09 Auto merge of #71 - japaric:aeabi-aliases, r=japaric
add missing aeabi aliases
2016-09-22 22:55:43 +00:00
Jorge Aparicio
2d630eedfd add missing aeabi aliases 2016-09-22 17:02:36 -05:00
homunkulus
0223d851b8 Auto merge of #67 - japaric:gcc_s, r=japaric
test our implementations against gcc_s

if it exposes the same intrinsics that we implement -- gcc_s doesn't
implement all the intrinsics for all the architectures.

closes #65

r? @Amanieu
Tested on Linux x86_64 and against the x86_64 and the arm-gnueabi targets. Unclear whether this works on osx or windows.
2016-09-22 22:01:46 +00:00
Jorge Aparicio
ea3aab9701 Merge pull request #68 from japaric/another-thumb
test the thumbv7em-none-eabihf target
2016-09-22 12:24:01 -05:00
Jorge Aparicio
a5b15eef71 fix build.rs
we don't want to match musleabihf targets
2016-09-22 11:56:34 -05:00
Jorge Aparicio
a83c11232e avoid division overflow in idivmod test 2016-09-22 10:32:15 -05:00
Jorge Aparicio
34f17b2ecf test the thumbv7em-none-eabihf target 2016-09-22 06:15:05 -05:00
Jorge Aparicio
bc61db2e36 don't test always against gcc_s
instead test half of the time against gcc_s and the other half test
against the native operation (\*).

(\*) Not all the targets have available a native version of the
intrinsics under test. On those targets we'll end up testing our
implementation against itself half of the time. This is not much of a
problem because we do several quickcheck runs per intrinsic.
2016-09-21 21:38:06 -05:00
Jorge Aparicio
7a56ac6bb4 armhf: don't compare our impls against gcc_s 2016-09-21 21:14:38 -05:00
Jorge Aparicio
294c6a93d8 avoid division overflow in idivmod test 2016-09-17 21:10:41 -05:00
Jorge Aparicio
0ae6c5db88 osx: link to dylib, windows: always return None 2016-09-17 20:23:58 -05:00
Jorge Aparicio
656cd2b308 test our implementations against gcc_s
if it exposes the same intrinsics that we implement -- gcc_s doesn't
implement all the intrinsics for all the architectures.

closes #65
2016-09-16 15:53:14 -05:00
Jorge Aparicio
152f5150f6 homu test 2016-09-10 19:12:50 -05:00
Jorge Aparicio
74459fdf12 test for homu 2016-09-10 18:37:35 -05:00
Jorge Aparicio
4553b1fc76 appveyor: test on auto and try only 2016-09-10 16:54:54 -05:00
Jorge Aparicio
becf6eea62 homu-ify 2016-09-10 16:49:32 -05:00
Jorge Aparicio
e237a46f40 tell cargo which linker to use 2016-08-29 21:35:53 -05:00
Jorge Aparicio
a88958c673 install less stuff
it's already installed in the docker image
2016-08-29 21:25:23 -05:00
Jorge Aparicio
d253b6a2e4 travis: use latest docker image 2016-08-29 21:21:59 -05:00
Jorge Aparicio
80f867f306 pin xargo and gist versions 2016-08-29 20:37:41 -05:00
Jorge Aparicio
17386437c8 fix typo 2016-08-29 20:36:52 -05:00
Jorge Aparicio
a8774eb192 travis: simplify ci scripts 2016-08-29 19:31:49 -05:00
Jorge Aparicio
62d5f58908 print rustup version 2016-08-27 12:34:39 -05:00
Jorge Aparicio
90d58ada7a appveyor: use rustup 2016-08-27 11:37:35 -05:00
Jorge Aparicio
2e516532d1 set language: ruby on osx only 2016-08-23 21:20:57 -05:00
Jorge Aparicio
1ae3b29270 use newer docker image
it comes with ruby pre-installed
2016-08-23 21:19:18 -05:00
Jorge Aparicio
185143e90f use the gist gem instead of the gist crate
hopefully this will work on osx and will make everything more
uniform (appveyor is already using the gem instead of the crate)

closes #51
2016-08-23 20:48:24 -05:00
Jorge Aparicio
ff17cfaa46 README: when and how to use this crate 2016-08-23 20:35:30 -05:00
Jorge Aparicio
72db6febd0 README: add AppVeyor badge 2016-08-23 20:23:28 -05:00
Jorge Aparicio
bcf5a641df README: fix link 2016-08-23 20:17:39 -05:00
Jorge Aparicio
79411ae643 use the gist crate
but not on OSX because it doesn't work there

closes #53
cc #51
2016-08-22 21:22:16 -05:00
Matt Ickstadt
ed393f32a1 appveyor: Use gist to post disassembly 2016-08-22 17:49:39 -05:00
Matt Ickstadt
5e867a2b98 travis: Use wgetpaste to post disassemblies to gist 2016-08-22 17:49:39 -05:00
Matt Ickstadt
6a96cf52b6 Add a Porting Reminders section to the README 2016-08-21 15:49:32 -05:00
Jorge Aparicio
ae9d294297 use utility function to compare the repr of floats
follow up of #43
2016-08-21 11:24:58 -05:00
Jorge Aparicio
43ce7db752 only show disassembly of optimized build
we can't really compare the disassembly of the debug build to
libcompiler-rt.a anyways
2016-08-21 11:09:32 -05:00
Jorge Aparicio
e5455d7f12 Merge pull request #49 from japaric/edge
qc: bias towards generation of edge cases
2016-08-21 11:03:44 -05:00
Matt Ickstadt
30428ec88f Use mem::swap to swap variables 2016-08-20 22:30:02 -05:00
Jorge Aparicio
e4dabb8c32 qc: bias towards generation of edge cases 2016-08-20 22:17:50 -05:00
Matt Ickstadt
fe3c35131f Implement soft float add builtins 2016-08-20 16:06:02 -05:00
Matt Ickstadt
35d68d8ab2 Move integer functions to separate module 2016-08-20 15:55:06 -05:00
Jorge Aparicio
f96d56dc37 Merge pull request #44 from Amanieu/sdiv
Add signed division functions
2016-08-19 09:16:53 -05:00
Amanieu d'Antras
59fe09c493 Add tests for ARM division builtins 2016-08-19 12:13:02 +01:00
Amanieu d'Antras
161234b8b3 Add signed division functions 2016-08-19 12:13:02 +01:00
Jorge Aparicio
3fddb6b427 rename muldi4 to muldi3
closes #42
2016-08-18 21:27:16 -05:00
Jorge Aparicio
f2341f101f Merge pull request #40 from mattico/add-x86_64
Add x86_64 builtins
2016-08-18 20:31:53 -05:00
Jorge Aparicio
ec2ff1e5cf Merge pull request #41 from mattico/dumpbin
appveyor: inspect binaries
2016-08-17 14:39:13 -05:00
Matt Ickstadt
f9c8ca854a Check off x86_64 builtins in README
[ci ignore]
2016-08-17 14:35:48 -05:00
Matt Ickstadt
77ffc1f9a0 Appveyor: Ignore errors from dumpbin parsing rlib 2016-08-17 14:14:47 -05:00
Matt Ickstadt
0ce86ac501 Appveyor: Source vcvarsall to get dumpbin in path 2016-08-17 13:51:35 -05:00
Matt Ickstadt
22331947ea Disable mangling for msvc stack builtins
This prevents linker errors in test builds due to the `jmp` instruction in __alloca
2016-08-17 12:55:15 -05:00
Matt Ickstadt
7e238f9973 Use jmp to implement __alloca fallthrough 2016-08-17 12:11:38 -05:00
Matt Ickstadt
f0dbe4c07c Add x86_64 builtins 2016-08-16 19:55:17 -05:00
Jorge Aparicio
63a87352d8 add core_intrinsics feature gate 2016-08-15 21:08:04 -05:00
Jorge Aparicio
de150c1701 adjust test: weak symbols are now in librlibc.rlib 2016-08-15 20:22:58 -05:00
Jorge Aparicio
b193bf698d remove unused feature gates 2016-08-14 22:08:36 -05:00
Jorge Aparicio
ae75d02bdd use rlibc crate instead 2016-08-14 22:03:19 -05:00
Jorge Aparicio
670f4e32aa check presence of weak symbols 2016-08-14 22:02:43 -05:00
Jorge Aparicio
a8c6135b38 exclude windows and macos 2016-08-14 22:01:15 -05:00
Jorge Aparicio
657a0cd18a add weak memcpy et al symbols
closes #28
2016-08-14 22:00:31 -05:00
Jorge Aparicio
a87180452e sort targets 2016-08-13 20:25:16 -05:00
Jorge Aparicio
331ffdfc79 Merge pull request #38 from japaric/ppc64le
try 32-bit qemu for ppc64le
2016-08-13 20:24:35 -05:00
Jorge Aparicio
44aa941787 disable tests for ppc64le, drop logic around QEMU_ARCH 2016-08-13 19:56:34 -05:00
Jorge Aparicio
2d84d8acd4 add missing apt-get update 2016-08-13 19:30:30 -05:00
Jorge Aparicio
c4fc85e357 Merge pull request #36 from japaric/qc
quickcheck: better generation of input arguments
2016-08-13 19:27:54 -05:00
Jorge Aparicio
18265c1061 try 32-bit qemu for ppc64le 2016-08-13 18:58:41 -05:00
Jorge Aparicio
ebb3175dc0 use wrapping_add in muldi4 2016-08-13 18:47:39 -05:00
Jorge Aparicio
f7864eb3cd fix a bug in udivmoddi4 2016-08-13 18:45:00 -05:00
Jorge Aparicio
b8b7cbeabd qemu-ppc64le still doesn't work 2016-08-13 18:33:40 -05:00
Jorge Aparicio
2160b520ff enable tests for ppc64le 2016-08-13 18:00:49 -05:00
Jorge Aparicio
7a5032317e need to set PATH for macos 2016-08-13 17:53:26 -05:00
Jorge Aparicio
b80d5f6912 arm targets no longer have flaky tests 2016-08-13 17:46:12 -05:00
Jorge Aparicio
54e090113a no need to explicitly call qemu-$ARCH 2016-08-13 17:45:43 -05:00
Jorge Aparicio
0433fc0deb sort targets 2016-08-13 17:43:40 -05:00
Jorge Aparicio
c7a48515ac don't call docker inside docker 2016-08-13 17:36:00 -05:00
Jorge Aparicio
a8f3f4eae6 use trusty 2016-08-13 17:32:08 -05:00
Jorge Aparicio
cc6aab07ea actually enter docker 2016-08-13 17:27:18 -05:00
Jorge Aparicio
ea81bca98f fix bash syntax 2016-08-13 17:24:52 -05:00
Jorge Aparicio
7b46e31124 CI: run all Linux targets inside docker 2016-08-13 17:22:12 -05:00
Jorge Aparicio
5581cc40af quickcheck: better generation of input arguments
closes #31
2016-08-13 16:58:44 -05:00
Jorge Aparicio
319c938e93 Merge pull request #35 from japaric/cortex
CI: test ARM Cortex targets
2016-08-13 13:16:13 -05:00
Jorge Aparicio
da0515756a install libssh2 2016-08-13 12:58:44 -05:00
Jorge Aparicio
2684ea570c change Xargo installation path 2016-08-13 12:55:09 -05:00
Jorge Aparicio
c135ca3157 binutils -> gcc 2016-08-13 12:47:59 -05:00
Jorge Aparicio
a3a0604b8e no rust-std for these targets 2016-08-13 12:45:37 -05:00
Jorge Aparicio
b5b26a0384 install binutils manually 2016-08-13 12:41:50 -05:00
Jorge Aparicio
5e69a93dfb binutils -> gcc? 2016-08-13 12:27:56 -05:00
Jorge Aparicio
1b757d626d CI: test ARM Cortex targets
closes #32
2016-08-13 12:12:37 -05:00
Amanieu d'Antras
d668c385ac Fix inline assembly to work on ARMv6-M 2016-08-13 17:29:38 +01:00
Amanieu d'Antras
1a60c3d52f Various changes 2016-08-13 09:56:40 +01:00
Amanieu d'Antras
07afa89f10 Remove the absv implementation, it isn't needed by Rust 2016-08-13 09:54:58 +01:00
Jorge Aparicio
f22f7cdd86 README: cross out a few intrinsics for the TODO list 2016-08-11 02:12:01 -05:00
Jorge Aparicio
25b25d5e8e appveyor: inspect binaries 2016-08-11 01:52:48 -05:00
Jorge Aparicio
57a3f411dd address second row of review 2016-08-11 01:45:48 -05:00
Jorge Aparicio
01a8a996b5 don't transmute in test 2016-08-11 01:42:34 -05:00
Jorge Aparicio
bcd525fe61 put div intrinsics in their own module + some docs 2016-08-11 01:26:27 -05:00
Jorge Aparicio
24344f1dca refactor: use Int traits, words -> U64, fmt 2016-08-11 01:15:51 -05:00
Jorge Aparicio
d66ff75198 note about calling convention 2016-08-11 00:36:19 -05:00
Jorge Aparicio
6be47a3524 move return into if branches 2016-08-11 00:33:27 -05:00
Jorge Aparicio
6d663ebb9c *mut T -> Option<&mut T> 2016-08-11 00:31:49 -05:00
Jorge Aparicio
4c93f05195 port __udivmodsi4, aeabi_uidivmod and udivsi3
also rewrite these last two new aeabi intrinsics as naked functions
2016-08-11 00:26:16 -05:00
Jorge Aparicio
2aaa38504f and libc6-dev 2016-08-11 00:26:16 -05:00
Jorge Aparicio
003d4d1521 some targets need gcc to be installed 2016-08-11 00:26:16 -05:00
Jorge Aparicio
2eb2ac115d port udivmoddi4 and __aeabi_uldivmod 2016-08-11 00:26:12 -05:00
Amanieu d'Antras
2880fd70ad Add traits for integer operations 2016-08-11 05:38:11 +01:00
Jorge Aparicio
989cd751cc ppc64: test on 32-bit QEMU 2016-08-10 13:01:22 -05:00
Jorge Aparicio
1d924aa047 mips: run test on 32-bit QEMU
cc #2
2016-08-10 11:50:41 -05:00
Jorge Aparicio
3d2573086f libgcc_s dev version 2016-08-09 16:17:06 -05:00
Jorge Aparicio
f484596465 32-bit version of libgcc 2016-08-09 15:55:25 -05:00
Jorge Aparicio
4e6c1b1be3 add libgcc 2016-08-09 15:46:57 -05:00
Jorge Aparicio
57c1e1344e put the target first 2016-08-09 15:37:51 -05:00
Jorge Aparicio
5e8812c574 use docker 2016-08-09 15:37:24 -05:00
Jorge Aparicio
a601cae4b4 use trusty 2016-08-09 12:43:41 -05:00
Jorge Aparicio
3aa17dec7a CI: test i586-unknown-linux-gnu 2016-08-09 12:25:49 -05:00
Jorge Aparicio
d6acb778e4 fix bash syntax 2016-08-09 12:04:24 -05:00
Jorge Aparicio
b191b89e87 fix armv7 2016-08-09 11:53:49 -05:00
Jorge Aparicio
4d0da42b08 don't run tests on targets that have QEMU issues
cc #2
2016-08-09 11:49:55 -05:00
Jorge Aparicio
59a8ab6c87 CI: test mipsel-unknown-linux-gnu 2016-08-08 23:26:13 -05:00
Jorge Aparicio
e9f11c6f12 CI: test powerpc64-unknown-linux-gnu 2016-08-08 23:05:25 -05:00
Jorge Aparicio
04c097a6e3 allow failure 2016-08-08 22:47:37 -05:00
Jorge Aparicio
b458b43397 fix case syntax 2016-08-08 22:31:14 -05:00
Jorge Aparicio
cb83ffc7f7 CI: test mips-unknown-linux-gnu 2016-08-08 22:03:44 -05:00
Jorge Aparicio
808ff7d469 allow failure 2016-08-08 21:57:18 -05:00
Jorge Aparicio
c3a501ec3b fix target name in case 2016-08-08 21:49:31 -05:00
Jorge Aparicio
378bab2a11 fix package name 2016-08-08 21:46:24 -05:00
Jorge Aparicio
32758212c8 put first in the queue 2016-08-08 21:43:13 -05:00
Jorge Aparicio
5e6dc52747 no sudo 2016-08-08 21:43:01 -05:00