Amanieu d'Antras
76d52cdd68
Fix std_detect not being an unstable crate
...
More fallout from #1486
2024-01-05 11:14:38 +00:00
Amanieu d'Antras
fd973c2765
Fix std build failure on non-x86 architectures
...
This is more fallout from #1486
2024-01-04 13:00:34 +00:00
Amanieu d'Antras
a600c72f50
Fixes for use in the standard library
2024-01-02 17:46:10 +00:00
Amanieu d'Antras
b5406fedd4
Add #![allow(internal_features)]
to a test to fix CI
2023-12-19 01:25:56 +00:00
Gijs Burghoorn
786f28dd8b
Stabilize Ratified RISC-V Target Features
...
As shortly discussed on Zulip
(https://rust-lang.zulipchat.com/#narrow/stream/250483-t-compiler.2Frisc-v/topic/Stabilization.20of.20RISC-V.20Target.20Features/near/394793704 ), this commit stabilizes the ratified RISC-V instruction bases and extensions.
Specifically, this commit stabilizes the:
* Atomic Instructions (A) on v2.0
* Compressed Instructions (C) on v2.0
* Integer Multiplication and Division (M) on v2.0
* Bit Manipulations (B) on v1.0 listed as `zba`, `zbc`, `zbs`
* Scalar Cryptography (Zk) v1.0.1 listed as `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt`, `zbkb`, `zbkc` `zkbx`
2023-11-30 22:53:04 +00:00
ZHAI Xiang
5625c8bf49
std_detect: Add support for LoongArch
...
Co-authored-by: WANG Rui <wangrui@loongson.cn>
2023-10-31 14:37:10 +01:00
Eduardo Sánchez Muñoz
eaa7298694
Derive Default
for Initializer
in std_detect
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
4bfd9935f7
Simplify a cfg
2023-10-31 02:20:17 +01:00
Eduardo Sánchez Muñoz
936583f12c
Do not deny clippy::missing_inline_in_public_items
in std_detect
2023-10-31 02:20:17 +01:00
Amanieu d'Antras
ea27e5cfcb
Fix various compilation errors
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
3e5850284a
Fix more missing/incorrect feature specifications
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
b8ba57f310
Cleanup last uses of the stdsimd feature
2023-10-29 20:39:50 +01:00
Amanieu d'Antras
21599975ff
Add tracking issues for feature detection
2023-10-29 20:39:50 +01:00
Eduardo Sánchez Muñoz
b2c5bc9696
Remove unneeded transmutes
...
(or replace them with safe versions)
2023-10-11 18:11:51 +02:00
bjorn3
6f33e9c36b
Remove use of auv crate from tests
2023-10-10 14:38:20 +01:00
bjorn3
d1df958a32
Remove the auxv dev dependency.
...
It hasn't been used since roughly 2018. The latest published version of
auxv has a less common license and doesn't specify any license in it's
Cargo.toml file.
2023-10-10 14:38:20 +01:00
Amanieu d'Antras
5161de5da4
Add #![allow(internal_unstable)]
...
This is required to avoid build failures when using rustc features
intended only for use by the standard library.
2023-08-29 15:21:34 +02:00
Jacob Bramley
a9fecd8456
Support AArch32 Neon dotprod intrinsics.
...
Note that the feature detection requires a recent Linux kernel (v6.2).
2023-06-21 18:52:21 +02:00
Taiki Endo
38c1a16190
std_detect: Do not use libc::getauxval on 32-bit Android
...
libc crate currently doesn't provide it.
2023-04-24 12:50:27 -07:00
Urgau
5d4192a9d6
Remove useless drop (clippy drop_ref and drop_copy lint)
2023-04-21 06:41:55 -07:00
Taiki Endo
221eb88986
std_detect: Remove support for 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
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
Nilstrieb
e41918d76c
Allow internal_features
2023-03-19 21:31:00 +01:00
Chase Wilson
1f0116fea9
Implemented is_x86_feature_detected!(ermsb)
2023-03-12 20:20:06 +01:00
Kathryn Long
1515d52d17
add f16c to x86 detection test
2023-03-12 20:19:54 +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
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
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
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
Caleb Zulawski
39c2524e1b
Detect MOVBE ( #1356 )
2023-01-05 17:54:07 +00:00
Caleb Zulawski
0b2b195544
Rename misleading features ( #1355 )
2022-11-21 20:56:45 +00:00
gendx
45e3039ee9
Detect CPU features with Linux methods on Android for non-Intel CPUs. ( #1351 )
...
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2022-11-09 18:38:48 +00:00
Mateusz Mikuła
9f7ded4282
Fix line endings to use LF ( #1350 )
2022-11-09 00:37:10 +00:00
Yuri Astrakhan
81c221f058
Edition 2021, apply clippy::uninlined_format_args fix ( #1339 )
2022-10-25 20:17:23 +01:00
Rageking8
90f618d8dd
Fix dupe word typos ( #1344 )
2022-10-25 15:01:34 +01:00
Jacob Bramley
8a944e5a5f
Add HWCAP2 support for AArch64 Linux. ( #1335 )
2022-09-22 05:31:46 +01:00
Charles Lew
676d095f0a
Bump cfg-if
dependency to 1.0
2022-09-11 13:05:05 +02:00
Tomasz Miąsko
39f73ac0b3
Allow internal use of stdsimd from detect_feature
...
This allows using feature detection macros, without placing a
requirement of enabled stdsimd feature gate from end users.
A follow-up to changes from #1311 , which introduced the new macro.
2022-08-22 22:40:39 +02:00