Commit Graph

2119 Commits

Author SHA1 Message Date
Alex Crichton
72b440075e Use macros for more division/array checks (#244)
* Use macros for more division/array checks

This commit moves over more array accesses to the `i!` macro to avoid
bounds checks when debug assertions are disabled. This is surfaced from
rust-lang/compiler-builtins#360 where recent changes in codegen units
has caused some bounds checks to not get elided in release mode. This
also adds a `div!` macro to work around rust-lang/rust#72751.

* Don't test/bench our shim crate

It's not intended to run all our tests
2020-05-29 14:16:51 -05:00
Alex Crichton
a0f9847f1d Bump to 0.1.29 2020-05-26 13:12:24 -07:00
Tomasz Miąsko
ca827eb234 Use crate visibility for traits (#358)
Co-authored-by: Tomasz Miąsko <tomasz.miasko@gmail.com>
2020-05-26 15:12:10 -05:00
Eric Huss
a2840567da Add more targets to automatically select mem feature. (#357) 2020-05-22 16:12:06 -05:00
Alex Crichton
5c41a11e62 Bump to 0.1.28 2020-05-11 22:29:49 -07:00
Alex Crichton
0e69cc8817 Switch to using llvm_asm! instead of asm! (#351)
* Switch to using `llvm_asm!` instead of `asm!`

* Run rustfmt

* Fix how LTO is specified on nightly
2020-04-29 15:30:10 -05:00
Alex Crichton
67ec7e4ccf Bump to 0.1.27 2020-04-13 07:17:28 -07:00
Tomasz Miąsko
ef99c37aae Place intrinsics in individual object files (#349)
Co-authored-by: Tomasz Miąsko <tomasz.miasko@gmail.com>
2020-04-10 17:00:50 -05:00
Alex Crichton
fd781d567f Bump to 0.1.26 2020-02-28 11:01:42 -08:00
Andre Richter
569b87d602 aarch64: Exclude FP intrinsics on +nofp or +nosimd (#344)
`AArch64` GCCs exit with an error condition when they encounter any kind of
floating point code if the `nofp` and/or `nosimd` compiler flags have been set.

Therefore, evaluate if those flags are present and set a boolean that causes any
compiler-rt intrinsics that contain floating point source to be excluded for
this target.

This patch prepares https://github.com/rust-lang/rust/pull/68334
2020-02-28 13:01:22 -06:00
Wolfgang Silbermayr
c82ad6a294 Use lower-case file extension for LICENSE.txt
The `LICENSE.txt` file should be distributed to crates.io, but it wasn't
due to the `Cargo.toml` entry in the `includes` field being
`LICENSE.txt` with lower-case file extension while the file itself had
an upper-case extension.
2020-02-21 11:03:51 +01:00
Yuxiang Zhu
d370d2728b add mips/mips64 compiler-rt fallbacks so that libgcc is not required
This adds compiler-rt fallbacks for mips and mips64 arches.

Solves linking issues like https://github.com/rust-lang/rust/issues/57820.

Signed-off-by: Yuxiang Zhu <vfreex@gmail.com>
2020-02-13 03:33:56 +08:00
Alex Crichton
8e87d8a3b5 Bump to 0.1.25 2020-02-11 22:21:38 -08:00
Tyler Mandry
6677b55fcb Set probestack visibility to hidden on ELF targets (#340) 2020-02-11 22:21:12 -08:00
Alex Crichton
b2227dc559 Update CI installation of Rust on macos 2020-01-28 00:39:52 -08:00
Daniel Frampton
8647190d6c Don't modify the intrinsic abi for aarch64 windows (#337) 2020-01-14 15:28:10 -06:00
Adam Schwalm
328332003d Add separate rust_probestack definition for uefi (#335)
This is necessary because the Mach-O definition must have the
triple underscore, but the UEFI one must not.
2020-01-06 10:22:30 -06:00
Alex Crichton
643306f308 Bump to 0.1.23 2019-12-10 09:02:40 -08:00
Runji Wang
304028b2ed Fix compile error on x86_64-unknown-uefi target (#331)
* fix compile error on x86_64-unknown-uefi target

* Fix tests on nightly
2019-12-10 09:02:14 -08:00
Alex Crichton
c056e295e2 Bump to 1.0.22 2019-12-06 06:54:50 -08:00
Tyler Mandry
d511d48b97 Add control flow information to __rust_probestack (#328) 2019-12-06 08:51:42 -06:00
Alex Crichton
ca69fcbf12 Update checkout action reference 2019-12-03 09:11:29 -08:00
Alex Crichton
d6d215b97c Bump to 0.2.1 2019-11-22 11:16:36 -08:00
AJ Frantz
a8d9eb7521 Fix sincosf for interval (7*pi/4, 9*pi/4) (#233)
A mistake was made in porting musl's implementation which caused the sin
and cos components to be reversed.

closes rust-lang/libm#232
2019-11-22 13:16:00 -06:00
Alex Crichton
62c025e9a8 Update publishing instructions 2019-11-11 10:40:09 -08:00
Alex Crichton
4729d8bf39 Bump to 0.1.21 2019-11-11 10:39:08 -08:00
Alex Crichton
eb58e12abf Gate atomic intrinsics on presence of instructions (#324)
Don't emit the intrinsics for platforms which don't actually have the
instructions to do atomic loads/stores.

Closes #322
2019-11-11 12:38:50 -06:00
Alex Crichton
3f473cd3f3 Allow FFI-unsafe warnings for u128/i128 (#323)
* Allow FFI-unsafe warnings for u128/i128

Handle new warnings on nightly, and we shouldn't need to worry about
these with compiler-builtins since this is tied to a particular compiler.

* Clean up crate attributes

* No need for stability marker
* Rustdoc docs not used for this crate
* Remove old build-system related cruft from rustc itself.

* Run `cargo fmt`
2019-11-11 12:19:10 -06:00
Alex Crichton
5067dce074 Bump to 0.1.20 2019-11-07 11:04:36 -08:00
Oliver Scherer
bff186bef3 Emit _fltused on uefi targets as a short-term workaround (#317)
* Emit `_fltused` on `uefi` targets as a short-term workaround

* Remove stray docker container
2019-11-07 13:04:11 -06:00
Alex Crichton
12283c7aca Fix Github Actions for recent system changes 2019-10-28 07:39:04 -07:00
Christopher Serr
3b3f3e977c Fix sincosf(PI) (#229)
Looks like the implementation was not ported correctly. Some negations
were forgotten in a certain branch. Here is the original code in musl
that has the negations:

94cb2ec2a0/src/math/sincosf.c (L66-L67)

Resolves rust-lang/libm#228
2019-10-18 08:23:57 -05:00
Ian Kronquist
af3d2e0a3c Implement bcmp (#315)
As of LLVM 9.0, certain calls to memcmp may be converted to bcmp, which I guess
could save a single subtraction on some architectures. [1]

bcmp is just like memcmp except instead of returning the difference between the
two differing bytes, it returns non-zero instead. As such, memcmp is a valid
implementation of bcmp.

If we care about size, bcmp should just call memcmp.
If we care about speed, we can change bcmp to look like this instead:
```rust
pub unsafe extern "C" fn bcmp(s1: *const u8, s2: *const u8, n: usize) -> i32 {
    let mut i = 0;
    while i < n {
        let a = *s1.offset(i as isize);
        let b = *s2.offset(i as isize);
        if a != b {
            return 1;
        }
        i += 1;
    }
    0
}
```

In this PR I do not address any changes which may or may not be needed for arm
aebi as I lack proper test hardware.

[1]: https://releases.llvm.org/9.0.0/docs/ReleaseNotes.html#noteworthy-optimizations
2019-09-30 11:02:47 -05:00
Alex Crichton
52ecbdd9c0 Remove -nursery from urls 2019-09-25 11:20:49 -07:00
Alex Crichton
30bf61039f Remove -nursery from urls 2019-09-25 11:20:14 -07:00
Alex Crichton
d7adb275eb Update the gitmodule url for libm 2019-09-25 11:19:35 -07:00
Alex Crichton
0198311a4b Migrate to github actions from Azure Pipelines
Less need to manage users, more concurrency, and interface is all in
one!
2019-09-10 21:57:13 -05:00
Alex Crichton
fda4a8992f Migrate from azure pipelines to Github actions (#226)
Should make user management easier and also helps follow the repository
when it's renamed.
2019-09-10 10:07:17 -05:00
Lokathor
b86b2d59bc update the libm submodule, again 2019-09-09 19:43:37 -06:00
Lokathor
e796054f9e Update build.rs 2019-09-06 18:02:11 -06:00
Lokathor
e079f2d70d Update build.rs 2019-09-06 15:20:05 -06:00
Lokathor
3ab350613b Update the libm submodule 2019-09-06 13:48:15 -06:00
Lokathor
e9a2b2ca11 i was told to change this path to my repo and reset things 2019-09-06 11:37:00 -06:00
Lokathor
0960b00b10 suppress useless clippy warnings 2019-09-05 08:57:15 -06:00
Lokathor
de3480c3c2 Update run.sh 2019-09-05 08:36:08 -06:00
Lokathor
06184b8d10 use sebug_assertions 2019-09-05 08:33:34 -06:00
Lokathor
c847d46c64 swap stable to be unstable, use debug_assertions 2019-09-05 08:33:23 -06:00
Lokathor
c6fbe72886 swap stable to be unstable 2019-09-05 08:33:03 -06:00
Lokathor
9811b57af2 swap stable to be unstable 2019-09-05 08:32:38 -06:00
Lokathor
de80131c26 swap stable to be unstable, checked is now debug_assertions 2019-09-05 08:32:26 -06:00