Codebase list golang-golang-x-sys / 59e60aa
cpu: don't read ARM64 registers on Android It seems like on Android we're not allowed in all cases to read the registers ISAR0, ISAR1 and PFR0 to detect CPU features. Fixes golang/go#36622 Change-Id: I577bd928a5a4dcd6e908cf059faa15fc0c80e3e5 Reviewed-on: https://go-review.googlesource.com/c/sys/+/215237 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Tobias Klauser authored 4 years ago Tobias Klauser committed 4 years ago
1 changed file(s) with 7 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
99
1010 func init() {
1111 switch runtime.GOOS {
12 case "darwin":
13 // iOS does not seem to allow reading these registers
14 case "android", "linux":
12 case "android", "darwin":
13 // Android and iOS don't seem to allow reading these registers.
14 // Fake the minimal features expected by
15 // TestARM64minimalFeatures.
16 ARM64.HasASIMD = true
17 ARM64.HasFP = true
18 case "linux":
1519 doinit()
1620 default:
1721 readARM64Registers()