[sys] cpu: better defaults on darwin ARM64

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Feb 12, 2026, 12:29:39 PM (18 hours ago) Feb 12
to Gerrit Bot, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Junyang Shao, Keith Randall, Keith Randall, Nuno Cruces, Go LUCI, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
cpu: better defaults on darwin ARM64

This is motivated by
https://github.com/wazero/wazero/pull/2473
which needs to special case darwin for testing the availability of
HasATOMICS, although all M-series CPUs support it.

We could do sysctlbyname, like syscall_darwin_x86_gc.go, if that's
preferred:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics
Change-Id: I0f5ea55ef5cda4956db44b2d40f2f10044fa3321
GitHub-Last-Rev: d5d0f1e989579de2a25c97c00c7e9db5d4b0cb29
GitHub-Pull-Request: golang/sys#267
Auto-Submit: Keith Randall <k...@golang.org>
Reviewed-by: Keith Randall <k...@golang.org>
Reviewed-by: Keith Randall <k...@google.com>
Reviewed-by: Junyang Shao <shaoj...@google.com>
Files:
  • M cpu/cpu_arm64.go
  • A cpu/cpu_darwin_arm64.go
  • M cpu/cpu_gccgo_arm64.go
  • M cpu/cpu_other_arm64.go
Change size: S
Delta: 4 files changed, 34 insertions(+), 8 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Keith Randall, +2 by Keith Randall, +1 by Junyang Shao
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sys
Gerrit-Branch: master
Gerrit-Change-Id: I0f5ea55ef5cda4956db44b2d40f2f10044fa3321
Gerrit-Change-Number: 743320
Gerrit-PatchSet: 3
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Junyang Shao <shaoj...@google.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
Gerrit-CC: Nuno Cruces <ncr...@gmail.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages