33 Commits

Author SHA1 Message Date
Joshua Nelson
b411a5c375
Convert all crates to 2018 edition (#1109) 2021-04-11 15:26:35 +01:00
Joshua Nelson
7bab2c0695
Deny 2018 idiom lints (#1108)
This lint is allow by default, which is why this wasn't spotted earlier.
It's denied by rust-lang/rust, so it's good to warn about it here so it
can be fixed more quickly.
2021-04-07 05:46:39 +01:00
Mateusz Mikuła
c06b820716
Bye bye MMX! (#890) 2020-09-03 14:12:19 +01:00
Mahmut Bulut
4541757677 feature detection 2020-05-29 19:05:48 +01:00
Amanieu d'Antras
079ce26eb7 Fix CI issues caused by updated nightly
Rust bug: https://github.com/rust-lang/rust/issues/72545
2020-05-28 17:20:07 +01:00
Taiki Endo
8f07ba7489 Update proc-macro2, syn, and quote to 1.0 2019-10-26 18:46:57 +02:00
gnzlbg
686b813f5d Update repo name 2019-07-09 01:37:07 +02:00
gnzlbg
4d46b98b81 Better error message when TARGET is missing 2019-04-19 12:39:33 +02:00
Radovan Birdic
d463a50b5a Implement all MSA Intrinsics 2019-04-09 09:43:17 +02:00
gnzlbg
8ebe7deadc Automatically insert emms after running each MMX test
After using MMX intrinsics the FPU must be
cleared by using _mm_empty() before interfacing
with any x87 code.

This commit makes the simd_test macro automatically do that
when one of the features enabled is "mmx".
2019-01-22 19:51:05 +01:00
Alex Crichton
ee0472520c Rerun rustfmt 2018-12-14 12:44:51 -08:00
Alex Crichton
dfc233c613 Remove usage of deprecated functions 2018-12-14 12:12:26 -08:00
Alex Crichton
5a45175fe1
Run rustfmt on stable, delete rustfmt.toml (#619)
This commit switches CI to running `rustfmt` on the stable compiler (as
rustfmt is stable now!). Additionally it deletes `rustfmt.toml` to
ensure we're following the same style as the rest of the ecosystem.
2018-12-13 17:26:22 -06:00
gnzlbg
47286d6c06 formatting 2018-11-22 13:45:03 +01:00
gnzlbg
eee3d5e6f0 fix clippy and shellcheck issues 2018-11-11 12:37:44 +01:00
gnzlbg
f31a104c1c formatting 2018-11-11 12:37:44 +01:00
Alex Crichton
f3cb25b8f9
Fix compile on latest nightly (#527)
The `proc_macro` feature has stabilized in the compiler and usage of it largely
needs to switch to `use_extern_macros` now.
2018-07-17 09:30:18 -05:00
gnzlbg
c3d273c980 reformat with latest rustfmt 2018-06-15 14:40:34 +02:00
Luca Barbato
4f2eff627e Replace the deprecated TokenStream::empty() with new()
Requires proc-macro2 0.4.4
2018-06-05 17:37:58 +02:00
Luca Barbato
c01982348e Add an env variable to ignore the arch-specific tests
Use STDSIMD_TEST_NORUN=1 to disable them.
2018-05-23 18:16:14 +02:00
Luca Barbato
9888c6ce82 Update proc macro2 (#455)
* Update to proc_macro2 0.4 and related

* Update to proc_macro2 0.4 and related

* Update to proc_macro2 0.4 and related

* Add proc_macro_gen feature

* Update to the new rustfmt cli

* A few proc-macro2 stylistic updates

* Disable RUST_BACKTRACE by default

* Allow rustfmt failure for now

* Disable proc-macro2 nightly feature in verify-x86

Currently this causes bugs on nightly due to upstream rustc bugs, this should be
temporary

* Attempt to thwart mergefunc

* Use static relocation model on i686
2018-05-21 13:37:41 -05:00
gnzlbg
696eea0211 add run-time feature detection for powerpc (#452) 2018-05-16 15:19:13 -05:00
gnzlbg
9e797f2de1 bugfix: cfg(tests) should be cfg(test) (#450) 2018-05-16 13:59:28 -05:00
gnzlbg
30962e58e6 fix errors/warnings from the stabilization of cfg_target_feature and target_feature (#432)
* fix build after stabilization of cfg_target_feature and target_feature

* fix doc tests

* fix spurious unused_attributes warning

* fix more unused attribute warnings

* More unnecessary target features

* Remove no longer needed trait imports

* Remove fixed upstream workarounds

* Fix parsing the #[assert_instr] macro

Following upstream proc_macro changes

* Fix form and parsing of #[simd_test]

* Don't use Cargo features for testing modes

Instead use RUSTFLAGS with `--cfg`. This'll help us be compatible with the
latest Cargo where a tweak to workspaces and features made the previous
invocations we had invalid.

* Don't thread RUSTFLAGS through docker

* Re-gate on x86 verification

Closes #411
2018-04-26 21:54:15 -05:00
Alex Crichton
52f9198902 Fix compile errors in simd-test-macro 2018-04-03 07:34:02 -07:00
Alex Crichton
a3def97fc6 Bump dependencies on proc-macro2 2018-04-03 07:17:40 -07:00
Jason Davies
f5503198b8 rustfmt 2018-03-27 16:09:03 +02:00
Alex Crichton
aafe6ebb75
Fix default cargo test experience (#397)
Turns out Cargo doesn't automatically set `TARGET` for rustc invocations so
carry it forward manually from the build script over to the rustc invocation.
2018-03-22 17:40:44 -05:00
gnzlbg
56d9a42a2f add tests for endian-dependent behavior (#394)
* add tests for endian-dependent behavior

* format
2018-03-22 11:09:01 -05:00
gnzlbg
ff53ec6cb2 add arm neon vector types (#384) 2018-03-20 09:11:50 -05:00
gnzlbg
2762e2ca9a [mips/mips64: msa] add add_a_b intrinsic (#365)
* [mips64/msa] add add_a_b intrinsic

* add make/file to mips64el's Dockerfile

* add run-time detection support for mips64

* add mips64 build bot

* generate docs for mips64

* fix linux test

* cleanup rt-detection

* support mips64/mips64el in stdsimd-test

* support asserting instructions with  in their name

* better error msgs for the auxv_crate test

* debug auxv on mips64

* override run-time detection on mips msa tests

* remove unused #[macro_use]

* try another MIPS cpu

* detect default TARGET in simd-test-macro

* use mips64r2-generic

* disable unused function in mips tests

* move msa to mips

* remove mips from ci

* split into mips and mips64 modules

* add rt-detection for 32-bit mips

* fmt

* remove merge error

* add norun build bots for mips

* add -p to avoid changing the cwd

* fixup

* refactor run-time detection module
2018-03-10 12:22:54 -06:00
Alex Crichton
56af498e9e
Rename is_target_feature_detected! (#346)
This commit renames the `is_target_feature_detected!` macro to have different
names depending on the platform. For example:

* `is_x86_feature_detected!`
* `is_arm_feature_detected!`
* `is_aarch64_feature_detected!`
* `is_powerpc64_feature_detected!`

Each macro already has a platform-specific albeit similar interface. Currently,
though, each macro takes a different set of strings so the hope is that like
with the name of the architecture in the module we can signal the dangers of
using the macro in a platform-agnostic context.

One liberty taken with the macro currently though is to on both the x86 and
x86_64 architectures name the macro `is_x86_feature_detected` rather than also
having an `is_x86_64_feature_detected`. This mirrors, however, how all the
intrinsics are named the same on x86/x86_64.
2018-03-07 09:46:16 -06:00
Alex Crichton
39b5ec91ae
Reorganize and refactor source tree (#324)
With RFC 2325 looking close to being accepted, I took a crack at
reorganizing this repository to being more amenable for inclusion in
libstd/libcore. My current plan is to add stdsimd as a submodule in
rust-lang/rust and then use `#[path]` to include the modules directly
into libstd/libcore.

Before this commit, however, the source code of coresimd/stdsimd
themselves were not quite ready for this. Imports wouldn't compile for
one reason or another, and the organization was also different than the
RFC itself!

In addition to moving a lot of files around, this commit has the
following major changes:

* The `cfg_feature_enabled!` macro is now renamed to
  `is_target_feature_detected!`
* The `vendor` module is now called `arch`.
* Under the `arch` module is a suite of modules like `x86`, `x86_64`,
  etc. One per `cfg!(target_arch)`.
* The `is_target_feature_detected!` macro was removed from coresimd.
  Unfortunately libcore has no ability to export unstable macros, so for
  now all feature detection is canonicalized in stdsimd.

The `coresimd` and `stdsimd` crates have been updated to the planned
organization in RFC 2325 as well. The runtime bits saw the largest
amount of refactoring, seeing a good deal of simplification without the
core/std split.
2018-02-18 10:07:35 +09:00