Commit Graph

589 Commits

Author SHA1 Message Date
Alex Crichton
9a6cfe4844 Merge pull request #172 from alexcrichton/update-compielr-rt
Update compiler-rt submodule
2017-07-01 07:49:17 -07:00
Alex Crichton
37538e8c2a Update compiler-rt submodule
Needed to pull in some recent changes with rust-lang/rust
2017-07-01 00:31:53 -07:00
Jorge Aparicio
b9d6291682 no aeabi_mem* symbols on iOS, weak symbols on thumb, normal symbols elsewhere 2017-06-30 18:06:25 -05:00
Jorge Aparicio
f096e02f63 optimize 32-bit aligned mem{cpy,clr,set} intrinsics for ARM
this reduces the execution time of all these routines by 40-70%
2017-06-29 22:40:58 -05:00
Jorge Aparicio
326c0bb597 enable tests now that #150 has been fixed 2017-06-27 22:48:57 -05:00
Alex Crichton
6792390e3e Enable the intrinsics program on thumb 2017-06-25 10:09:50 -07:00
Alex Crichton
0e404583e8 Address review comments 2017-06-24 21:51:34 -07:00
Alex Crichton
f9db3c5b32 Don't test mangled names on thumb
We are both the "real compiler-rt" and the "to be tested one".
2017-06-24 12:54:35 -07:00
Alex Crichton
60028c1d9d Enable 128-bit integer tests on Windows
Closes #158
2017-06-24 12:23:28 -07:00
Alex Crichton
e7008c8609 Don't check for references to panics with debug assertions 2017-06-24 11:44:50 -07:00
Alex Crichton
e8964fc7dd Don't build gcc_personality_v0 2017-06-24 11:36:05 -07:00
Alex Crichton
3eff54a4ee Don't generate unmangled aeabi with gen-tests
The symbols they delgate to also don't exist...
2017-06-24 11:34:10 -07:00
Alex Crichton
90dab55cb0 Don't try to work with cargo test 2017-06-24 10:22:49 -07:00
Alex Crichton
cf1419e538 Add a FIXME for Windows 2017-06-24 10:12:17 -07:00
Alex Crichton
cec593c2aa Tweak testing and such:
* Don't run `intrinsics` tests on thumb
* Disable `compiler_builtins` attribute on `feature = "gen-tests"`
* Disable mangling on `feature = "gen-tests"` instead of `cfg(test)`
2017-06-24 10:10:04 -07:00
Alex Crichton
4dfb2c5f09 Fix appveyor PATH 2017-06-23 21:38:55 -07:00
Alex Crichton
1614443a68 Try to fix run.sh on AppVeyor 2017-06-23 21:36:36 -07:00
Alex Crichton
c785055bd9 Remove usage of unwrap_or_else 2017-06-23 21:31:54 -07:00
Alex Crichton
80112d198d Use the same CI script on AppVeyor 2017-06-23 21:23:52 -07:00
Alex Crichton
d5279752b0 Don't derive Debug for Sign 2017-06-23 21:11:31 -07:00
Alex Crichton
d3e78c5f6f Don't compile assembly on x86_64 Windows
They've all got the wrong ABI...
2017-06-23 21:09:24 -07:00
Alex Crichton
bbaf9fd85a Don't build chkstk on x86_64 2017-06-23 20:43:51 -07:00
Alex Crichton
af944595d0 Try testing MinGW targets 2017-06-23 20:35:25 -07:00
Alex Crichton
4bb783da70 Remove the travis cache 2017-06-23 20:20:42 -07:00
Alex Crichton
e8efe11f71 Shore up docs in the macros module 2017-06-23 16:28:50 -07:00
Alex Crichton
6db18f6536 Handle aeabi aliasing
Objects in compiler-rt may have two symbols, so this makes sure that we don't
bring in those objects by accident by defining the aliases ourselves.
2017-06-23 15:55:11 -07:00
Alex Crichton
78b290b61c Deal with floatdidf on x86_64
Apparently LLVM will lower this down to just an instruction
2017-06-23 13:28:24 -07:00
Alex Crichton
f091d05904 Tweak usage of C shims on MSVC 2017-06-23 12:03:33 -07:00
Alex Crichton
4dbe3aaf2d Use nm to weed out panics 2017-06-23 11:52:22 -07:00
Alex Crichton
11d3cffd30 Remove unused rust file 2017-06-23 11:21:36 -07:00
Alex Crichton
0e5562c38d Remove executable bit on arm.rs 2017-06-23 11:21:15 -07:00
Alex Crichton
d20a774a4a Remove defined intrinsics from build.rs
No need to load these from C!
2017-06-23 11:14:50 -07:00
Alex Crichton
bf2f5b5808 Convert float intrinsics to the intrinsics! macro 2017-06-23 11:05:25 -07:00
Alex Crichton
c53d1c7b7d Remove executable bit from conv.rs 2017-06-23 10:44:59 -07:00
Alex Crichton
e8d550ee51 Less verbose output on symbol check 2017-06-23 10:44:29 -07:00
Alex Crichton
e798d1bf81 Enable mem for intrinsics on linux 2017-06-23 09:59:49 -07:00
Alex Crichton
b6a4de6be5 Fix features needed for the intrinsics example 2017-06-23 08:35:24 -07:00
Alex Crichton
43bb211be8 Fix travis intrinsics builds 2017-06-23 08:19:11 -07:00
Alex Crichton
57b8dd1812 Fix use_c_shim_if 2017-06-23 07:54:31 -07:00
Alex Crichton
5a36c4b54b Use more intrinsics on msvc 2017-06-23 07:53:34 -07:00
Alex Crichton
b6497f5283 Build tweaks 2017-06-23 07:36:08 -07:00
Alex Crichton
48c4569e91 Build the intrinsics example separately 2017-06-23 07:01:18 -07:00
Alex Crichton
0aead6b3d8 Require the compiler-builtins target for the example 2017-06-23 06:58:05 -07:00
Alex Crichton
1740b0b0f5 More windows linkage guesses 2017-06-23 06:53:09 -07:00
Alex Crichton
e892808fdd Test 64-bit linux 2017-06-22 23:44:27 -07:00
Alex Crichton
107cbd36a0 Try to fix linkage on windows 2017-06-22 23:41:28 -07:00
Alex Crichton
0d1138fad3 Fix the abi hack on windows 2017-06-22 23:36:50 -07:00
Alex Crichton
dd059dd1fc Port udiv to the intrinsics! macro 2017-06-22 23:23:36 -07:00
Alex Crichton
e80da4a48a Port sdiv to traits + intrinsics!
Enhance `intrinsics!` along the way!
2017-06-22 23:09:28 -07:00
Alex Crichton
285a69b29c Port mul intrinsics to traits
Also add a few features to the `intrinsics!` macro
2017-06-22 22:36:37 -07:00
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