Repository navigation
feat(cpufeatures): Extend ARM64 and x86 feature detection - #1565
Open
reneleonhardt wants to merge 3 commits into
Open
reneleonhardt wants to merge 3 commits into
reneleonhardt wants to merge 3 commits into
Conversation
Add NEON and more vector, scalar and memory feature detectors. Read the second capability word only when needed. Check all required bits, including Rust's FP16 and SVE requirements. Make Apple capability queries safe. Return false for missing keys. Keep MOPS runtime detection false on Apple without a documented capability key. Use compiler feature checks on targets without runtime detection. Test sparse masks, missing bits, cached queries and combined queries. Test sysctl names and results with an injected reader. Run pure guards under Miri.
Add SIMD prerequisites, AVX2 and AVX-512 extensions, XSAVE variants and ERMSB/PREFETCHW memory hints. Check CPUID limits before reading leaves and subleaves. Read extended and XSAVE data only when needed. Check CPU prerequisites and OS register state. XSAVE needs CPU and OS support but does not require AVX register state. Require an unsafe context to check register state from supplied CPUID data. Test sparse flags, missing prerequisites, CPUID limits, cached queries and combined queries. Check each required register-state bit. Test unsafe query boundaries with compile-fail tests. Run pure guards under Miri with unsigned CPUID inputs. Keep runtime detection disabled under Miri.
Use Ubuntu ARM64 runners for both compiler versions. Remove Docker and QEMU setup. Remove the unused macOS x86 target download. Keep the same test and compiler matrix.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
no_stduseCloses #865
Refs #1112 and #1532 (
avx512vnnisupport)New flags
bf16,crc,cssc,faminmax,fcma,fhm,frintts,i8mm,jsconv,lse2,lut,mops,neon,randf32mm,f64mm,sve,sve-b16b16,sve2,sve2-aes,sve2-bitperm,sve2-sha3,sve2-sm4,sve2p1cmpxchg16b,f16c,fxsr,lahfsahf,lzcnt,movbexsave,xsavec,xsaveopt,xsavesermsb,prfchwavxifma,avxneconvert,avxvnni,avxvnniint16,avxvnniint8avx512bf16,avx512fp16,avx512vnni,avx512vp2intersectMOPS runtime detection returns false on Apple because no public capability key is documented.
Validation
no_stdwith libc 0.2.155