Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/sys/cpu: add support for darwin/arm64 #43046

Open
martisch opened this issue Dec 7, 2020 · 2 comments · May be fixed by golang/sys#202
Open

x/sys/cpu: add support for darwin/arm64 #43046

martisch opened this issue Dec 7, 2020 · 2 comments · May be fixed by golang/sys#202
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@martisch
Copy link
Contributor

martisch commented Dec 7, 2020

darwin/arm64 support for internal/cpu was implemented in c155931 using a mix of dynamic detection with sysctlbyname and hardcoded minimal feature support assumed on darwin/arm64.

For x/sys/cpu it can be assumed it only needs to work with Go 1.16 and newer. Interestingly darwing/arm64 was previosly used for the now ios/arm64 port. We should keep compatibility such that old code still compiles pre Go 1.16 even if there may be no runtime detection supported.

Implementing support for x/sys/cpu will be a bit more complex. While x/sys/cpu does not need to be as low dependency as internal/cpu it should still avoid uncommon or large dependencies. Note that x/sys/cpu is vendored into the standard library for some crypto support that is also vendored in.

x/sys/cpu should avoid a dependency on x/sys/unix: #32102

@gopherbot gopherbot added this to the Unreleased milestone Dec 7, 2020
@martisch martisch added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 7, 2020
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/397754 mentions this issue: cpu: support darwin/arm64 feature detection

aadomnicai pushed a commit to aadomnicai/sys that referenced this issue Jul 8, 2024
Use commpage to determine which CPU features are enabled.
Additionally, enable some safe features for the Apple M1 CPU.

Builds off CL 332729.

Fixes golang/go#43046

Change-Id: I72c89e78e26d6681cb396e37a1fa9a0bc4b68e69
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/616555 mentions this issue: sha3: add SIMD implementation with ARMv8.2 features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants