971 Commits

Author SHA1 Message Date
Luca Barbato
0fa72df240 Add vec_all_gt and vec_any_gt 2023-04-13 01:54:42 +01:00
Luca Barbato
24cc2fdb85 Add vec_all_ge and vec_any_ge 2023-04-13 01:54:42 +01:00
Luca Barbato
c587804586 Add vec_all_eq and vec_any_eq 2023-04-13 01:54:42 +01:00
Luca Barbato
2749cfe2ff Move the altivec macros in a stand alone files 2023-04-13 01:54:42 +01:00
Kisaragi
600533dbdc x86: remove unnecessary parens 2023-04-12 21:41:28 +01:00
Jubilee Young
adc506ddaa Clarify undefined can still mean init
These intrinsics actually are zeroing, so we should be upfront
that these still return a valid value in reality. At most,
we might in the future want to use a "freezing" semantics here.
In any case, they are definitely not returning MaybeUninit,
or any other possibly-poison value.
2023-04-11 13:17:42 +01:00
Amanieu d'Antras
c66be336c6 Fix CI 2023-04-08 21:41:40 +01:00
Amanieu d'Antras
acee6b804a stdarch-test: Ignore {evex} prefix emitted by recent objdump 2023-04-08 21:41:40 +01:00
Taiki Endo
221eb88986 std_detect: Remove support for arm crypto target feature 2023-04-01 18:42:27 +01:00
Taiki Endo
1ec5981759 core_arch: Remove uses of arm crypto target feature 2023-04-01 18:42:27 +01:00
Taiki Endo
1661f06cd0 std_detect: Always avoid dlsym on *-android* targets 2023-04-01 18:41:20 +01:00
Amanieu d'Antras
fbed7945aa Update intrinsic tests for LLVM 16 2023-03-30 15:43:03 +01:00
Luca Barbato
a331bc9512 Fix the powerpc feature guards
Now the documentation should be generated correctly and vsx isn't always
present.
2023-03-25 23:05:16 +01:00
Luca Barbato
0af4d8a307 std_detect: Unbreak auxv_from_file
Discovered on powerpc64 where it crashes since it has more entries.
2023-03-25 00:33:58 +01:00
Amanieu d'Antras
fff3c73f11 Mark more arm_shared intrinsics and types as stable in docs
This is a follow-up to #1345 where these appeared as unstable in the
standard library docs because they are only stabilized for ARM. They
were missed in the original PR.
2023-03-24 23:27:24 +01:00
Luca Barbato
e82aebe756 core_arch: Unbreak powerpc64 tests 2023-03-24 23:27:08 +01:00
Nilstrieb
e41918d76c Allow internal_features 2023-03-19 21:31:00 +01:00
Taiki Endo
fe04ca5624 core_arch: Update cmpxchg16b docs and fix feature name
- Fix a typo in the feature name
- Update docs to reflect changes in behavior on invalid ordering in
  stabilized PR: invalid ordering is no longer UB, just causes panic as
  well as compare_exchange
2023-03-19 16:09:29 +01:00
Alex Crichton
be861579df wasm32: Add relaxed simd instructions
This commit adds intrinsics to the `wasm32` to support the [relaxed SIMD
proposal][proposal]. These are added with the same naming conventions of
existing simd-related intrinsics for wasm which is similar to the
instruction name but matches sign in a few places.

This additionally updates Wasmtime to execute tests with support for the
relaxed simd proposal. No release has been made yet so this uses the
`dev` release, and I can make a PR in April when the support in Wasmtime
has been released to an official release. The `wasmprinter` crate is
also updated to understand these instruction opcodes as well.

Documentation has been added for all intrinsics, but tests have only
been added for some of them so far. I hope to follow-up later with more
tests.

[proposal]: https://github.com/WebAssembly/relaxed-simd
2023-03-19 16:08:18 +01:00
Chase Wilson
1f0116fea9 Implemented is_x86_feature_detected!(ermsb) 2023-03-12 20:20:06 +01:00
Kathryn Long
a63313212b Stabilize f16c intrinsics 2023-03-12 20:19:54 +01:00
Kathryn Long
1515d52d17 add f16c to x86 detection test 2023-03-12 20:19:54 +01:00
Amanieu d'Antras
644e8f8900 Replace associated const hacks with inline consts
Fixes #1368
2023-03-05 18:00:21 +01:00
Taiki Endo
c7daba316e Re-add #![feature(target_feature_11)]
We removed this in 307c42fbf4bdfdda2c46fdc1d330cc61d96b5182, but the
stabilization was reverted in https://github.com/rust-lang/rust/pull/108654.
2023-03-05 17:02:26 +01:00
Taiki Endo
ba58f91769 std_detect: Support run-time detection of crc/aes/sha2/crypto on arm FreeBSD 2023-03-01 19:58:15 +01:00
Taiki Endo
8f9ed37be7 std_detect: Support run-time detection of fp on aarch64 Windows
According to google/cpu_features, IsProcessorFeaturePresent(PF_ARM_VFP_32_REGISTERS_AVAILABLE)
returns whether fp is available.
a6bf4f9031/src/impl_aarch64_windows.c (L112-L113)
2023-03-01 19:57:28 +01:00
Taiki Endo
169d8d8c48 Fix stable_features warnings
```
warning: the feature `cmpxchg16b_target_feature` has been stable since 1.69.0-nightly and no longer requires an attribute to enable
  --> crates/core_arch/src/lib.rs:24:5
   |
24 |     cmpxchg16b_target_feature,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(stable_features)]` on by default

warning: the feature `target_feature_11` has been stable since 1.69.0-nightly and no longer requires an attribute to enable
  --> crates/core_arch/src/lib.rs:34:5
   |
34 |     target_feature_11,
   |     ^^^^^^^^^^^^^^^^^
```
2023-03-01 18:56:19 +01:00
Taiki Endo
a9681a2ca6 Merge core_arch/tests/cpu-detection.rs to std_detect/tests/cpu-detection.rs
Except for the recently added `x86_deprecated` test,
`core_arch/tests/cpu-detection.rs` is a subset of
`std_detect/tests/cpu-detection.rs`.
2023-03-01 18:53:20 +01:00
Kuba Jaroszewski
56faab71f8 Fix typo 2023-02-23 12:51:14 +01:00
Артём Павлов
0301eced58 Update Intel Intrinsics Guide links 2023-02-18 20:34:16 +01:00
bwmf2
1c18225f32 Fix typo 2023-02-18 20:02:17 +01:00
Taiki Endo
e6b7951ccd std_detect: Remove extra cfg
This module is already `#[cfg(target_arch = "aarch64")]`.
2023-02-13 02:04:54 +01:00
Taiki Endo
2ebd1395ec std_detect: Only check features that are known to be available on armv8.0 cores if CPU is Exynos 9810 2023-02-13 02:04:54 +01:00
Taiki Endo
e9d18c6b18 std_detect: Workaround Exynos 9810 bug on aarch64 Android
Samsung Exynos 9810 has a bug that big and little cores have different
ISAs. And on older Android (pre-9), the kernel incorrectly reports
that features available only on some cores are available on all cores.

https://reviews.llvm.org/D114523
2023-02-13 02:04:54 +01:00
Taiki Endo
dc49234574
std_detect: Support run-time detection of FEAT_LSE2 on aarch64 BSD (#1379) 2023-02-11 17:31:21 +00:00
Taiki Endo
57c492180d
std_detect: Update platform support docs (#1380) 2023-02-11 16:10:11 +00:00
Felix
217a7d106a
update the URL of Intel CPUID reference book (#1376) 2023-02-07 15:17:59 +01:00
Taiki Endo
1829ee06f0
std_detect: Always avoid dlsym on *-linux-gnu* targets (#1375) 2023-02-03 18:23:09 +00:00
Taiki Endo
a36f5bd7c8 std_detect: Support run-time detection on aarch64 OpenBSD 2023-01-26 23:33:52 +00:00
Taiki Endo
d3bb923c82 std_detect: Split os/aarch64.rs' detect_features into reading and parsing 2023-01-26 23:33:52 +00:00
Taiki Endo
674fd58f60 std_detect: Move aarch64 freebsd test to tests/cpu-detection.rs 2023-01-26 23:33:52 +00:00
Taiki Endo
e706a13add std_detect: Add test for feature detection on aarch64 Windows 2023-01-23 22:26:08 +00:00
Taiki Endo
505d4e8d48 std_detect: Support detecting lse/dotprod/jsconv/rcpc on aarch64 Windows 2023-01-23 22:26:08 +00:00
Jacob Bramley
6e5b949ee7 Check and pass the ACLE licence on to generated tests.
The generated tests are transient, and aren't committed, so this is
primarily a safety check.
2023-01-23 18:58:28 +00:00
Jacob Bramley
4407146bb8 Declare licence for crates/intrinsics-test. 2023-01-23 18:58:28 +00:00
Urgau
8048734108 Remove obsolete cfg for nvptx
Following to the compiler MCP 496
(https://github.com/rust-lang/compiler-team/issues/496)
2023-01-22 18:20:30 +00:00
Jacob Bramley
262d7c77bf Don't declare f16c_target_feature.
f16c_target_feature was recently stabilised.

This fixes a warning that results in a CI failure (due to `-D
stable-features`) with current nightly Rust.
2023-01-22 15:38:02 +00:00
Ralf Jung
5afa869e0a use inline const for last simd_shuffle argument 2023-01-10 00:23:14 +00:00
Jacob Bramley
4364634d74 Remove some trailing whitespace. 2023-01-09 15:08:12 +00:00
Jacob Bramley
665e33f3be Match Neon test features to their intrinsics.
The tests can run if and only if the target_features for the
corresponding intrinsics are detected at run-time, so make sure that the
tests have an appropriate `simd_test()`.

This fixes some failures due to tests running when they shouldn't. For
example, some tests would fail on hardware that lacks "fcma".
2023-01-09 15:08:12 +00:00