Skip to content

Conversation

@HippoBaro
Copy link
Contributor

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.

HippoBaro added 2 commits May 12, 2025 18:12
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.
Copy link
Owner

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the contribution! <3

@klauspost klauspost merged commit 462c017 into klauspost:master May 14, 2025
10 checks passed
craciunoiuc

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants