fix(x86): require OS AVX support for F16C, VAES and VPCLMULQDQ - #473
Open
dennisimoo wants to merge 2 commits into
Open
dennisimoo wants to merge 2 commits into
dennisimoo wants to merge 2 commits into
Conversation
Author
|
Fixed formatting in 6fe7b10 using CI’s formatter. All four local tests pass; CI awaits approval. |
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.
F16C, VAES and VPCLMULQDQ were reported from their CPUID bits even when the OS
does not enable the required XMM/YMM state. A caller selecting instructions from
these flags could therefore select an unsupported path.
Move the three assignments into the existing
os_preserves->avx_registersblock alongside AVX and FMA3. This follows the SIMD availability contract at the
top of the implementation; LLVM's host detection
also gates all three features on
HasAVXSave. No public API changes.The regression test advertises all three CPUID features and toggles OS register
support. All three negative assertions fail before the fix; both disabled and
enabled cases pass afterward.
Tested on x86-64 Linux with GCC 13:
All four native test executables pass. This was found during source review, not
from a reported downstream incident. Prepared with AI assistance.