]> Cypherpunks repositories - gostls13.git/commit
internal/cpu: implement CPU feature detection for openbsd/arm64
authorJoel Sing <joel@sing.id.au>
Fri, 5 Aug 2022 13:39:55 +0000 (23:39 +1000)
committerGopher Robot <gobot@golang.org>
Mon, 8 Aug 2022 15:07:46 +0000 (15:07 +0000)
commitcd54ef1f61945459486e9eea2f016d99ef1da925
tree0a283a1aaa25efa87009e206741bc6ebfed735fe
parentfefac44a62fe0cfda73ab4abf15bf35b58faa6ac
internal/cpu: implement CPU feature detection for openbsd/arm64

OpenBSD 7.1 onwards expose the aarch64 ISAR0 and ISAR1 registers via sysctl:

  $ sysctl machdep
  machdep.compatible=apple,j274
  machdep.id_aa64isar0=153421459058925856
  machdep.id_aa64isar1=1172796674562

Implement CPU feature detection for openbsd/arm64 based on this information.

Fixes #31746

Change-Id: If8a9b2b8fc557e1aaefbcb52f4d1bd9efc43856d
Reviewed-on: https://go-review.googlesource.com/c/go/+/421875
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Run-TryBot: Ian Lance Taylor <iant@google.com>
src/internal/cpu/cpu_arm64_openbsd.go [new file with mode: 0644]
src/internal/cpu/cpu_arm64_other.go
src/runtime/os_openbsd.go