Commit Graph

645 Commits

Author SHA1 Message Date
Alex Crichton
8b76d44636 Bump to 0.1.19 2019-07-24 07:05:29 -07:00
Alex Crichton
0f6042793a
Merge pull request #306 from da-x/probestack-frame-pointer
probestack: add frame pointers for easier traceback
2019-07-24 09:04:02 -05:00
Dan Aloni
84e8cc74c5 probestack: add frame pointers for easier traceback
This turns the following backtrace,

```
>> bt
 #0  0x0000555555576f73 in __rust_probestack () at /cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.14/src/probestack.rs:55
Backtrace stopped: Cannot access memory at address 0x7fffff7fedf0
```

To this:

```
>>> bt
 #0  0x0000555555574e47 in __rust_probestack ()
 #1  0x00005555555595ba in test::main ()
 #2  0x00005555555594f3 in std::rt::lang_start::{{closure}} ()
 #3  0x0000555555561ae3 in std::panicking::try::do_call ()
 #4  0x000055555556595a in __rust_maybe_catch_panic ()
 #5  0x000055555555af9b in std::rt::lang_start_internal ()
 #6  0x00005555555594d5 in std::rt::lang_start ()
 #7  0x000055555555977b in main ()
```
2019-07-24 10:18:30 +03:00
Alex Crichton
fb35190998 Bump to 0.1.18 2019-07-19 07:44:17 -07:00
Alex Crichton
3c36beb31b
Merge pull request #302 from bjorn3/no_128bit_lang_items
Replace {u,i}128_* lang items with __rust_{u,i}128_* unmangled functions
2019-07-19 09:44:00 -05:00
Alex Crichton
e80c858e20
Merge pull request #301 from RalfJung/dyn
avoid bare trait objects
2019-07-15 10:04:18 -05:00
Alex Crichton
7773dafe01 Bump to 0.1.17 2019-07-15 07:26:49 -07:00
bjorn3
4ca09454a8 Fix tests 2019-07-13 12:27:58 +02:00
bjorn3
8bd3e4d5a1 Replace {u,i}128_* lang items with __rust_{u,i}128_* unmangled functions
The -Zlower-128bit-ops feature is completely broken, as libcore needs
those lang items to compile with this feature, but they are only
provided by compiler_builtins, which itself depends on libcore.
According to rust-lang/rust#58969 the feature never got finished.

This commit removes the associated lang items and replaces them with
normal unmangled functions, when there is no existing intrinsic. This
makes it easier for alternative codegen backends to implement 128bit
integer support.
2019-07-13 11:38:35 +02:00
Ralf Jung
8ae096b544 avoid bare trait objects 2019-07-13 11:07:43 +02:00
Ralf Jung
29ea38c623 remove unused imports 2019-07-13 11:00:15 +02:00
Ralf Jung
f4bc012b26 avoid ptr::write which might panic in debug mode 2019-07-13 10:55:54 +02:00
varkor
319ae3ab42 Bump to 0.1.16 2019-06-06 01:09:47 +01:00
Alex Crichton
06dbf6ac2d
Merge pull request #298 from varkor/update-libm
Update libm for fmin/fmax/fminf/fmaxf
2019-06-05 18:34:37 -05:00
Alex Crichton
22030968eb More fixes for CI 2019-06-05 16:19:26 -07:00
Alex Crichton
0d83008f7a Attempt to fix CI 2019-06-05 16:09:39 -07:00
varkor
3fe09ab411 Update libm for fmin/fmax/fminf/fmaxf 2019-06-05 23:41:18 +01:00
Sean Leather
3b18638b98
Fix typo: mingw_unwinding 2019-05-21 08:43:50 +02: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
Ralf Jung
546492b69a don't force-on c feature when working in rustc workspace 2019-05-14 17:57:42 +02: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
3789bb1a98 Bump to 0.1.11 2019-04-30 10:08:23 -07:00
Goirad
63c0bd2522
Added missing fdim signature 2019-04-29 14:42:14 -07:00
Alex Crichton
76184c21e0 Add instructions for publishing 2019-04-08 07:55:09 -07:00
Alex Crichton
c2e2634223 Bump to 0.1.10 2019-04-08 07:52:05 -07:00
John Kåre Alsaker
36e4db0364 Update submodule for VS 2019 support 2019-04-08 16:30:33 +02:00
Alex Crichton
78d40ed30c
Update azure pipelines badge 2019-04-02 15:41:20 -05:00
Alex Crichton
26a01f97a8 Bump to 0.1.9 2019-04-02 13:05:56 -07:00
Alex Crichton
a6034d0b7b More fixes for i686-mingw 2019-04-02 13:02:22 -07:00
Alex Crichton
44181b42f4 Attempt to fix MinGW targets 2019-04-02 12:51:36 -07:00
Alex Crichton
25692977a3
Merge pull request #277 from alexcrichton/less-wasi-sysm
Don't compile math symbols on wasm32-unknown-wasi
2019-04-02 14:44:24 -05:00
Alex Crichton
9772acb3cd Re-enable all targets 2019-04-02 12:17:23 -07:00
Alex Crichton
b73fa4b764 Try to fix Windows 2019-04-02 12:12:29 -07:00