Commit Graph

2049 Commits

Author SHA1 Message Date
varkor
2db94e02d8 Add max 2019-06-05 20:59:28 +01:00
varkor
a3c8111c5f Add maxf 2019-06-05 20:59:28 +01:00
varkor
193e7960f9 Add min 2019-06-05 20:59:28 +01:00
varkor
f1c957e832 Add minf 2019-06-05 20:59:28 +01:00
Alex Crichton
13a350ca5d Attempt to fix CI 2019-06-05 12:17:01 -07:00
Igor null
5c48fccd6c fixed add overflow in exp2 2019-06-03 13:16:03 +03:00
Sean Leather
3b18638b98 Fix typo: mingw_unwinding 2019-05-21 08:43:50 +02:00
Benjamin Schultzer
332d8fd21c Add docs 2019-05-16 23:06:43 -07:00
Benjamin Schultzer
c6b403f5a9 Run musl test in debug mode 2019-05-16 17:09:33 -07:00
Alex Crichton
9c469738d6 Bump to 0.1.15 2019-05-16 08:12:14 -07:00
Alex Crichton
b84b7143e8 Remove compiler-rt submodule from this repository
This commit removes the `compiler-rt` submodule from this repository.
The goal here is to align the `compiler-rt` used for compiling C
intrinsics with the upstream rust-lang/rust's usage of `llvm-project`.
Currently we have both an `llvm-project` repository as well as
`compiler-rt`, but they can naturally get out of sync and it's just one
more submodule to manage.

The thinking here is that the feature `c` for this crate, when
activated, will require the user to configure where the source code for
`compiler-rt` is present. This places the onus on the builder of
`compiler-builtins` to check-out and arrange for the appropriate
`compiler-rt` source code to be placed somewhere. For rust-lang/rust
this is already done with the `llvm-project` submodule, and we can
arrange for it to happen on this crate's CI anyway.

For users of this crate this is a bit of a bummer, but `c` is disabled
by default anyway and it seems unlikely that `c` is explicitly opted in
to all that much. (given the purpose of this crate)

This should allow us to archive the `compiler-rt` repository and simply
use `llvm-project` in the rust-lang/rust repository.
2019-05-16 07:50:20 -07:00
Alex Crichton
e6503aeea7 Bump to 0.1.14 2019-05-15 14:47:58 -07:00
Alex Crichton
f567dbb36b Remove the need for #[cfg] in #[use_c_shim_if]
This commit tweaks the implementation of the synthetic
`#[use_c_shim_if]` attribute, renaming it to
`#[maybe_use_optimized_c_shim]` in the process. This no longer requires
specifying a `#[cfg]` clause indicating when the optimized intrinsic
should be used, but rather this is inferred and printed from the build
script.

The build script will now print out appropriate `#[cfg]` directives for
rustc to indicate what intrinsics it's compiling. This should remove the
need for us to keep the build script and the source in sync, but rather
the build script can simply take care of everything.
2019-05-15 12:59:31 -07:00
Alex Crichton
02aaab7026 Bump to 0.1.13 2019-05-14 14:41:07 -07:00
Alex Crichton
b2cfc3a4f1 Run rustfmt over everything 2019-05-14 14:40:38 -07:00
Alex Crichton
55f996f77f Merge pull request #291 from alexcrichton/fix-riscv
Don't compile C code on riscv targets
2019-05-14 16:40:27 -05:00
Alex Crichton
9886a163b3 Don't compile C code on riscv targets
This fixes a longstanding bug in compiler-builtins where C code was
compiled for the riscv targets but when distributed in rust-lang/rust
all the C code was actually compiled for x86_64 since there is no
configured C compiler for riscv. This was exposed by #286 by accident
but the underlying cause was somewhat unrelated.

For now we forcibly disable C code for riscv targets, and when the C
compiler story is sorted out in rust-lang/rust and with `cc-rs` we can
reenable. For now just use all the Rust definitions.

cc rust-lang/rust#60747
2019-05-14 14:29:29 -07:00
Alex Crichton
9c0c27c87f Merge pull request #290 from alexcrichton/fix-targets
Fix __divsi3 and __udivsi3 on thumbv6m targets
2019-05-14 15:02:57 -05:00
Alex Crichton
6ddcff1475 Fix __divsi3 and __udivsi3 on thumbv6m targets
This commit fixes a bug accidentally introduced in #285 where some
lingering references remained to `#[cfg(thumbv6m)]` but this, since the
historical revert, was renamed to `#[cfg(thumb_1)]`. This caused on the
thumbv6m platform for the intrinsics to be accidentally omitted because
the build script didn't actually compile them but the Rust code thought
the C code was in use.

After correcting the `#[cfg]` statements the CI configuration for the
`thumb*` family of targets was all updated. The support for xargo
testing was removed from `run.sh` since it had long since bitrotted, and
the script was updated to simply build the intrinsics example to attempt
to link for each of these targets. This in turn exposed the bug locally
and allowed to confirm a fix once the `#[cfg]` statements were
corrected.

cc rust-lang/rust#60782
2019-05-14 12:26:09 -07:00
Alex Crichton
7448d0fac3 Bump to 0.1.3 2019-05-14 09:06:43 -07:00
Ralf Jung
546492b69a don't force-on c feature when working in rustc workspace 2019-05-14 17:57:42 +02:00
Igor null
03f6b3194e formatted rem_pio2 tests 2019-05-13 18:05:38 +03:00
Igor null
d583764530 added tests near pi for rem_pio2 2019-05-13 17:42:18 +03:00
Igor null
f8e5ff50c5 rem_pio2: actually return medium value for x ~<= 5pi/4 2019-05-13 12:14:03 +03:00
Andrey Zgarbul
0dff1621e0 fix jn, ilogb 2019-05-09 18:40:19 +03:00
Alex Crichton
8a74ccde21 Test jn and jnf 2019-05-09 07:58:57 -07:00
Alex Crichton
fba10c51e6 Generate NaN and Infinity more often
Make sure they come up in RNG generation of floats
2019-05-09 07:53:21 -07:00
Alex Crichton
f3e2ed67f9 Test sincos and sincosf 2019-05-09 07:52:52 -07:00
Alex Crichton
13981db1e1 Move non-public functions to pub(crate)
Remove exceptions from the test list after doing so
2019-05-09 07:27:10 -07:00
Andrey Zgarbul
bb88bad222 test several outputs 2019-05-09 12:10:11 +03:00
Andrey Zgarbul
7c1e4dbf11 fix traits 2019-05-09 07:36:52 +03:00
Andrey Zgarbul
ac371e42ef Merge branch 'm1elports' of https://github.com/burrbull/libm into m1elports 2019-05-09 07:00:32 +03:00
Andrey Zgarbul
5c5ba6fe82 rm asine, mv lgamma 2019-05-09 06:58:58 +03:00
Andrey Zgarbul
92db6e9c1b sh +x 2019-05-07 09:07:26 +03:00
Andrey Zgarbul
fcdb5a8c13 tests, fixes, format 2019-05-07 07:16:24 +03:00
Andrey Zgarbul
764f5741ee Merge branch 'lots-of-untested-ports' of https://github.com/m1el/libm 2019-05-06 09:11:10 +03:00
Alex Crichton
3a8b5e0244 Bump to 0.1.12 2019-05-02 15:18:37 -07:00
Alex Crichton
a41077e11b Merge pull request #286 from alexcrichton/fix-dupe
Fix duplicate symbol __clzsi2
2019-05-02 17:17:52 -05:00
Alex Crichton
74efb8e8e5 Merge pull request #287 from alexcrichton/reenable-mips
Enable historically segfaulting tests on MIPS
2019-05-02 16:44:40 -05:00
Alex Crichton
de566fec8c Fix duplicate floatdisf symbol on Windows MSVC 2019-05-02 14:22:19 -07:00
Alex Crichton
5aa50ead74 Merge pull request #284 from alexcrichton/ldexp
Include `ldexp*` intrinsics on the wasm target
2019-05-02 16:17:33 -05:00
Alex Crichton
21513cdcc2 Enable historically segfaulting tests on MIPS
They seem to be passing locally so let's see what CI has to say.

Closes #137
2019-05-02 13:44:20 -07:00
Alex Crichton
0899a164ed Fix duplicate symbol __clzsi2
Looks like our tests weren't quite testing compiler-builtins when it was
compiled with unmangled symbols, so update the tests to catch this and
then fix the compilation of the `__clzsi2` intrinsic to use the C
version if it's compiled.
2019-05-02 13:35:50 -07:00
Alex Crichton
98f4618c9a Revert "Use the Rust implementation of udivsi3 on ARM"
This reverts commit 681aaa914dea7cae8252c33023604ce6c91808bd.
2019-05-02 12:49:19 -07:00
Alex Crichton
1701e71ed6 Include ldexp* intrinsics on the wasm target
Looks like LLVM optimizes programs like:

    fn foo(a: u8) -> f32 {
        2.0f32.powf(a as f32)
    }

to actually invoking `ldexpf`, so let's be sure to include bindings so
there's not undefined symbols.
2019-05-02 12:40:39 -07:00
Alex Crichton
ef8a8ae9ee Merge pull request rust-lang/libm#161 from alexcrichton/ldexp
Add bindings for ldexp/ldexpf
2019-05-02 14:38:55 -05:00
Alex Crichton
a3ed9fdfcd Merge pull request rust-lang/libm#151 from 4tm4j33tk4ur/clippy
fixed some clippy warnings
2019-05-02 14:38:27 -05:00
Alex Crichton
01d0e3eed8 Run cargo fmt 2019-05-02 12:36:37 -07:00
Alex Crichton
3c2a09589a Merge pull request rust-lang/libm#153 from m1el/floorf-uint-underflow
Fixed uint overflow in floorf for negative exponents
2019-05-02 14:35:15 -05:00
Alex Crichton
dc3eebd0b7 Add a test that overflow does not happen 2019-05-02 12:34:05 -07:00