126 Commits

Author SHA1 Message Date
gnzlbg
fe06593c6f allow_internal_unstable requires feature names
Closes #681 .
2019-02-13 17:34:33 +01:00
gnzlbg
333784b5ef Fix libcore build 2019-02-12 01:02:07 +01:00
Henry de Valence
f842c007be Note that clang accepts _mm512_set1_epi64 on 32-bit.
Per https://github.com/rust-lang-nursery/stdsimd/pull/676#issuecomment-461384796 , LLVM is able to generate code for this intrinsic on `x86` targets.
2019-02-11 19:05:59 +01:00
Henry de Valence
94dd5f26e0 Add a fixup pass for cpuid values when validating XML. 2019-02-11 19:05:59 +01:00
Henry de Valence
19e23d1b15 Fix incorrect assert_instr tests. 2019-02-11 19:05:59 +01:00
Henry de Valence
ddd70f987f Add AVX512VL variants of IFMA instructions. 2019-02-11 19:05:59 +01:00
Henry de Valence
10e05055bf Add avx512ifma skeleton. 2019-02-11 19:05:59 +01:00
Henry de Valence
012db4342b Add _mm512_set1_epi64. 2019-02-11 19:05:59 +01:00
Ralf Jung
386420307a MaybeUninit: update to into_initialized (#679)
* MaybeUninit: update to into_initialized

* fix unused import
2019-02-11 07:22:45 -06:00
gnzlbg
ff129bff05 Add cargo features to disable usage of file I/O and dlsym in std_detect 2019-02-09 11:47:38 +01:00
gnzlbg
eb13680d1a Remove const workaround in std_detect cache 2019-02-05 09:34:34 +01:00
Juan Aguilar Santillana
e51ee17aa7 Add detect macros should support trailing commas (Fix #443) 2019-02-04 12:37:48 +01:00
gnzlbg
d226e32984 Add tests for addcarry and subborrow intrinsics (#672) 2019-01-31 10:11:54 -06:00
gnzlbg
6672ae3f9a Doc tests should use std 2019-01-31 13:07:26 +01:00
Alex Crichton
cf738b0d36
Attempt to fix tests on master (#662)
* Attempt to fix tests on master

* Make all doctests use items from the real `std` rather than this
  crate, it's just easier
* Handle debuginfo weirdness by flagging functions as `no_mangle` that
  we're looking for instructions within.

* Handle double undescores in symbol names
2019-01-30 15:11:35 -08:00
Nikita Popov
69e7d7ac3a Fix addcarry / subborrow intrinsic names (#661) 2019-01-30 12:53:40 -08:00
gnzlbg
957e6bdcc6 Update readme badges 2019-01-30 14:14:18 +01:00
gnzlbg
586c0ae423 Fix docs.rs rustdoc arguments 2019-01-30 13:56:59 +01:00
gnzlbg
0b3f69246c Bump core_arch and std_detect versions 2019-01-30 13:46:41 +01:00
gnzlbg
a49acaf78d Move the core::arch docs into a markdown file 2019-01-30 13:46:41 +01:00
gnzlbg
d5ef055ba9 Fix building docs for all targets on docs.rs and re-export the arch module 2019-01-30 13:46:41 +01:00
gnzlbg
25197fca7b Update readme and dependencies 2019-01-30 11:27:23 +01:00
gnzlbg
3f07066166 Remove integer_atomics feature gate due to stabilization 2019-01-30 11:27:23 +01:00
gnzlbg
80616364f6 Remove core_arch dev-dependency of std_detect 2019-01-30 11:27:23 +01:00
gnzlbg
72d929bed6 Bump core_arch and std_detect patch version 2019-01-30 11:27:23 +01:00
gnzlbg
3e0f1f754a Update description of core_arch and std_detect 2019-01-30 10:40:16 +01:00
gnzlbg
57fa47d5d3 Fix libcore doc tests 2019-01-24 11:19:06 +01:00
gnzlbg
af7134fcf1 Do not use Self constructors 2019-01-22 20:11:48 +01: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
gnzlbg
5f7006df5a Fix clippy issues 2019-01-22 19:23:32 +01:00
gnzlbg
1d1266b185 Readme from std_detect 2019-01-22 18:49:24 +01:00
gnzlbg
d989b154e5 Add README and licenses to core_arch 2019-01-22 18:49:24 +01:00
gnzlbg
e627b1ac4a Update versions of core_arch and std_detect for release 2019-01-22 18:49:24 +01:00
gnzlbg
11c624e488 Refactor stdsimd
This commit:

* renames `coresimd` to `core_arch` and `stdsimd` to `std_detect`

* `std_detect` does no longer depend on `core_arch` - it is a freestanding
  `no_std` library that only depends on `core` - it is renamed to `std_detect`

* moves the top-level coresimd and stdsimd directories into the appropriate
  crates/... directories - this simplifies creating crate.io releases of these crates

* moves the top-level `coresimd` and `stdsimd` sub-directories into their
  corresponding crates in `crates/{core_arch, std_detect}`.
2019-01-22 17:04:25 +01:00
gnzlbg
cac46058e2 Upgrade serde_xml_rs version 2019-01-21 16:45:12 +01:00
dependabot[bot]
cd0995d1e5 Update quickcheck requirement from 0.7 to 0.8
Updates the requirements on [quickcheck](https://github.com/BurntSushi/quickcheck) to permit the latest version.
- [Release notes](https://github.com/BurntSushi/quickcheck/releases)
- [Commits](https://github.com/BurntSushi/quickcheck/commits/quickcheck_macros-0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-01-21 15:18:16 +01:00
gnzlbg
81f0043872 enable wasm-bindgen feature of rand dependency 2019-01-21 13:19:00 +01:00
Alex Crichton
b3aa8524dc
Add ADX-related intrinsics (#631)
Closes #322
2019-01-07 10:04:38 -06:00
Alex Crichton
cb4bb2961d
Remove usage of platform-intrinsics where unadjusted works (#630)
As suggested [here]!

[here]: https://github.com/rust-lang/rust/pull/57048#issuecomment-449773525
2019-01-04 16:30:46 -06:00
Alex Crichton
9c4e418fe0 Add a x86_64::cmpxchg16b intrinsic
This intrinsic isn't actually specified by Intel, but it's something
gated with CPUID and can otherwise be a useful thing to have when
building primitives!

There exists an `AtomicU128` type in the standard library but it's only
exposed currently (and it's unstable) when a platform fully supports
128-bit atomics. The x86_64 architecture does not support it *unless*
the `cmpxchg16b` instruction is available, and it isn't always available!

This commit is also a proposal for how we can include support for
128-bit atomics in the standard library on relevant platforms. I'm
thinking that we'll expose this one low-level intrinsic in
`std::arch::x86_64`, and then if desired a crate on crates.io can build
`AtomicU128` from this API.

In any case this is all unstable regardless!
2019-01-02 16:55:53 +01:00
Peter Jin
d30c29e926 Add a build libcore-only nvptx64 test (using xargo).
This also disables the "integer_atomics" feature on nvptx/nvptx64.
2018-12-29 12:02:16 +01:00
Alex Crichton
9ab261c3d7
Implement automatic verification for ARM/AArch64 intrinsics (#626)
This commit implements automatic verification of implement ARM/AArch64
intrinsics. Or it's at least a start! This downloads a snapshot of ARM's
[online documentation][docs] and implements necessary logic to parse
that and use it to verify all the intrinsics. Almost everything
checked out A-OK but a few minor tweaks were needed to the neon
intrinsics and the crc ones needed some renaming.

[docs]: https://developer.arm.com/technologies/neon/intrinsics
2018-12-20 14:11:26 -06: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
67f8ed0bf4
Start adding some avx512 intrinsics (#618)
First one is the quite simple `_mm512_abs_epi32` intrinsic!
2018-12-14 09:44:26 -06:00
Alex Crichton
cb921381c4
Rewrite simd128 and wasm support (#620)
* Update representation of `v128`
* Rename everything with new naming convention of underscores and no
  modules/impls
* Remove no longer necessary `wasm_simd128` feature
* Remove `#[target_feature]` attributes (use `#[cfg]` instead)
* Update `assert_instr` tests
* Update some implementations as LLVM has evolved
* Allow some more esoteric syntax in `#[assert_instr]`
* Adjust the safety of APIs where appropriate
* Remove macros in favor of hand-coded implementations
* Comment out the tests for now as there's no known runtime for these
  yet
2018-12-13 20:17:30 -06: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
Greg V
02e0812d12 Add support for feature detection on FreeBSD/aarch64 2018-12-12 16:02:01 +01:00
gnzlbg
4a582fe37e Remove all usages of mem::uninitialized 2018-11-22 15:13:10 +01:00
gnzlbg
47286d6c06 formatting 2018-11-22 13:45:03 +01:00