-
Notifications
You must be signed in to change notification settings - Fork 259
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
compiler: require ARMv8.1 #2345
Conversation
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
See wasilibs/go-re2#136 for an instance of this happening. |
internal/platform/cpuid_arm64.go
Outdated
func loadCpuFeatureFlags() CpuFeatureFlags { | ||
switch runtime.GOOS { | ||
case "darwin", "windows": | ||
// These OSes require ARMv8.1, which includes atomic instructions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i get why darwin requires v8.1 by default (m series is so), but not sure about windows here. any reference or pointer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Windows 10 does not in fact require them, is it good enough to document this?
At least this change should not be a regression.
cc @anuraaga fyi |
This checks that Large System Extensions (atomic instructions) are supported on
arm64
. These are included in many processors, and are part of ARMv8.1, which is required by macOS and Windows 11.This is similar to the check that the
amd64
CPUs support SSE4.1 (which is part of x86-64-v2, and available on most processors).Biggest behavioral change is using
platform.CompilerSupported()
to decide whether to (not) use the compiler onwazero.NewRuntimeConfig()
, but I think this makes sense.