mirror of
https://github.com/wazero/wazero
synced 2026-06-21 14:12:37 +00:00
077fe36f77
Also: - updates minimum Go to 1.25, as per the policy defined in #2434 - tests using real RISC-V hardware - tests using Go 1.26 in CI --------- Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
16 lines
477 B
Go
16 lines
477 B
Go
package platform
|
|
|
|
import "golang.org/x/sys/windows"
|
|
|
|
// CpuFeatures exposes the capabilities for this CPU, queried via the Has method.
|
|
var CpuFeatures = loadCpuFeatureFlags()
|
|
|
|
func loadCpuFeatureFlags() (flags CpuFeatureFlags) {
|
|
// See: go.dev/cl/757482
|
|
// golang.org/x/sys/cpu can't import golang.org/x/sys/windows and can't do this yet.
|
|
if windows.IsProcessorFeaturePresent(windows.PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE) {
|
|
flags |= CpuFeatureArm64Atomic
|
|
}
|
|
return
|
|
}
|