darwin/arm64: fix SIMD detection and improve ARM feature probing#160
Merged
klauspost merged 3 commits intoklauspost:masterfrom May 14, 2025
Merged
darwin/arm64: fix SIMD detection and improve ARM feature probing#160klauspost merged 3 commits intoklauspost:masterfrom
klauspost merged 3 commits intoklauspost:masterfrom
Conversation
Contributor
HippoBaro
commented
May 12, 2025
Detection of Advanced SIMD (NEON) on M1 Macs was broken due to querying the wrong sysctl identifier. Apple's documentation lists "hw.optional.AdvSIMD" as the correct identifier, but in reality, it's "hw.optional.arm.AdvSIMD" as confirmed by `sysctl -a`. This patch corrects the identifier and adds support for its alias, "hw.optional .neon," ensuring proper detection across all models. Additionally, this patch revisits all ARM features detected by the package, cross-referencing identifiers (and aliases) against both Apple's official sysctl documentation: https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics and the ARM architecture reference manual: https://developer.arm.com/documentation/ddi0487/latest Each ARM feature now maps to all known sysctl aliases, preventing false negatives and improving detection accuracy on Apple Silicon.
klauspost
reviewed
May 13, 2025
klauspost
approved these changes
May 14, 2025
Owner
klauspost
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the contribution! <3
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.