Commit Graph

174 Commits

Author SHA1 Message Date
WANG Rui
ec673535f7 ci: add support for loongarch64-unknown-linux-gnu 2024-11-01 05:48:47 -05:00
Trevor Gross
0c97b10dc0 Add riscv64gc to CI
There is a proposal to promote `riscv64gc-unknown-linux-gnu` to tier 1
[1]. We do not currently test RISC-V in CI; add it here.

[1]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Imminent.20RFC.20PR.3A.20riscv64gc-unknown-linux-gnu.20to.20Tier-1
2024-10-02 16:35:28 -04:00
Trevor Gross
85cd4c0660 Fix some warnings from shellcheck 2024-09-28 21:24:44 -04:00
Trevor Gross
fdec3b6514 Fix unset variables in the build script
These were preventing building via Docker locally.
2024-06-22 16:15:46 +02:00
Trevor Gross
f2092967cb Update the Ubuntu docker image to the latest version 2024-06-22 05:58:25 -04:00
Trevor Gross
98ddf3c66d Enable cache for Docker images 2024-05-24 23:18:59 +02:00
Trevor Gross
6cd17ff4d2 Add benchmarks for floating point math
This adds comparisons among the compiler-builtins function, system
functions if available, and optionally handwritten assembly.

These also help us identify inconsistencies between this crate and
system functions, which may otherwise go unnoticed if intrinsics get
lowered to inline operations rather than library calls.
2024-05-24 02:49:41 -04:00
Henry Wang
7d60c93165 Only run --features c for verbatim test 2024-05-21 01:09:47 +02:00
theKidOfArcrania
416be726df verbatim tests only need to build 2024-05-21 01:09:47 +02:00
theKidOfArcrania
fd290b1339 Properly escape /C and fix naming 2024-05-21 01:09:47 +02:00
theKidOfArcrania
e3d86a8350 Instead have cmd.exe dump out path 2024-05-21 01:09:47 +02:00
theKidOfArcrania
0000f98d73 Fix backslash 2024-05-21 01:09:47 +02:00
theKidOfArcrania
e246ba5a46 Use cmd.exe 2024-05-21 01:09:47 +02:00
theKidOfArcrania
24cb0c2bcc Fix CI 2024-05-21 01:09:47 +02:00
theKidOfArcrania
3fdef93258 Add tests for UNC paths on windows builds 2024-05-21 01:09:47 +02:00
Trevor Gross
4509315d2f Enable no-fail-fast for more usable test output 2024-05-15 07:19:17 -05:00
Trevor Gross
ccfe0e3808 Deny warnings in CI
There are currently a lot of warnings printed in CI, mostly dead code.
Update CI to deny warnings.
2024-05-11 09:56:55 +02:00
beetrees
229babb1d0 Add builtins for f16/f128 float conversions 2024-05-02 13:49:24 +02:00
Trevor Gross
1b679e5cee Apply some more fixes suggested by Shellcheck 2024-04-19 11:49:23 -04:00
Trevor Gross
a55604fd8c Add a way to run tests on non-linux machines
Allow using the `rust-lang/rust:nightly` docker image to run tests in
cases where the host rust and cargo cannot be used, such as non-linux
hosts.
2024-04-19 11:49:23 -04:00
trevyn
dc1321a5ca Remove duplicate symbol workaround 2024-03-28 14:19:13 +00:00
Amanieu d'Antras
68b5a7a0ad Clean up and rework CI script 2024-03-28 10:17:42 +00:00
trevyn
0808cdeb67 build: Allow building C compiler-rt fallbacks for wasm 2024-01-09 02:11:00 +04:00
Amanieu d'Antras
c51299d63a Fix run-docker.sh so it can be run locally 2022-02-06 09:20:19 +00:00
Joseph Richey
5c294cedc0
Move from an "asm" flag to a "no-asm" feature flag (#386)
* Use a no-asm feature instead of an asm feature

This works better as core/alloc/std have trouble supporting default
featues in this crate.

Signed-off-by: Joe Richey <joerichey@google.com>

* Have no-asm disable arm assembly intrinsics

Signed-off-by: Joe Richey <joerichey@google.com>
2020-11-09 09:24:25 -06:00
Joseph Richey
34e35d74b6
Use REP MOVSQ/STOSQ on x86_64 (#365)
* mem: Move mem* functions to separate directory

Signed-off-by: Joe Richey <joerichey@google.com>

* memcpy: Create separate memcpy.rs file

Signed-off-by: Joe Richey <joerichey@google.com>

* benches: Add benchmarks for mem* functions

This allows comparing the "normal" implementations to the
implementations provided by this crate.

Signed-off-by: Joe Richey <joerichey@google.com>

* mem: Add REP MOVSB/STOSB implementations

The assembly generated seems correct:
    https://rust.godbolt.org/z/GGnec8

Signed-off-by: Joe Richey <joerichey@google.com>

* mem: Add documentations for REP string insturctions

Signed-off-by: Joe Richey <joerichey@google.com>

* Use quad-word rep string instructions

Signed-off-by: Joe Richey <joerichey@google.com>

* Prevent panic when compiled in debug mode

Signed-off-by: Joe Richey <joerichey@google.com>

* Add tests for mem* functions

Signed-off-by: Joe Richey <joerichey@google.com>

* Add build/test with the "asm" feature

Signed-off-by: Joe Richey <joerichey@google.com>

* Add byte length to Bencher

Signed-off-by: Joe Richey <joerichey@google.com>
2020-10-24 10:58:04 -05:00
Alex Crichton
63982a3b9e
Expand wasm32 testing on CI (#360)
* Expand wasm32 testing on CI

Run the full `run.sh` test script to get full assertions, including that
nothing in the wasm compiler-builtins is panicking. Unfortunately it's
currently panicking, so this is good to weed out!

* Update libm
2020-05-29 14:38:29 -05: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
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
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
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
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
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
a41077e11b
Merge pull request #286 from alexcrichton/fix-dupe
Fix duplicate symbol __clzsi2
2019-05-02 17:17:52 -05: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
b73fa4b764 Try to fix Windows 2019-04-02 12:12:29 -07:00
Alex Crichton
742b0330c5 Try to handle thumb targets and xargo 2019-04-02 11:54:20 -07:00
Alex Crichton
a2b87a1a7f Generate a lock file before using Docker
Can't do it in the readonly filesystem inside!
2019-04-02 09:53:05 -07:00
Alex Crichton
7567d9ceb4 Don't pass -it to docker 2019-04-02 09:35:47 -07:00
Alex Crichton
95f4f0cd4e Upgrade all docker containers to 18.04 2019-04-02 08:39:19 -07:00
Alex Crichton
cede5bc161 Expand Azure Pipelines configuration 2019-04-02 08:37:06 -07:00
Alex Crichton
b51f3d18a3 Configure Azure Pipelines 2019-04-02 08:24:11 -07:00
Alex Crichton
d3d3cc2126 Add sample azure pipelines configuration 2019-04-02 07:57:02 -07:00
Alex Crichton
1af471e00b Use nm on OSX
Looks like it may be fixed now?
2018-11-21 10:48:58 -08:00
Paolo Teti
d7799358e4 Remove no_std features
Everything default unconditionally to #![no_std].
2018-02-25 09:19:34 +01:00
Paolo Teti
81356ccde4 Keep mangled-names as a default feature 2018-02-25 01:11:49 +01:00
Paolo Teti
64ea229988 Fix CI for thumb* targets
Main fix is inside 'utest' all the rest are minor fixes due to the
new 'testcrate'.

Still allow failures on TravisCI for a while.
2018-02-18 18:15:57 +01:00
Alex Crichton
41290fe728 Simplify how testing is done
All tests are moved to a separate crate in this repository to enable features by
default. Additionally the test generation is moved to a seprate build script and
simplified to reduce the amount of boilerplate needed per test.

Overall this should still be testing everything, just in a different location!
2018-01-31 11:32:20 -08:00