1
0
mirror of https://github.com/golang/go synced 2024-11-17 13:04:54 -07:00

runtime: remove unused armArch

runtime.armArch is unused on linux/arm since CL 93637. The new code in
runtime/internal/atomic (added by CL 111315) only checks runtime.goarm.

Change-Id: Ic097ee6750e39abb20f45770a1c7c2d925f02408
Reviewed-on: https://go-review.googlesource.com/c/140077
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Tobias Klauser 2018-10-05 16:47:33 +02:00 committed by Brad Fitzpatrick
parent 497fd2c09c
commit 68d52969dd

View File

@ -4,20 +4,14 @@
package runtime
import (
"internal/cpu"
"unsafe"
)
import "internal/cpu"
const (
_AT_PLATFORM = 15 // introduced in at least 2.6.11
_HWCAP_VFP = 1 << 6 // introduced in at least 2.6.11
_HWCAP_VFPv3 = 1 << 13 // introduced in 2.6.30
)
var randomNumber uint32
var armArch uint8 = 6 // we default to ARMv6
func checkgoarm() {
// On Android, /proc/self/auxv might be unreadable and hwcap won't
@ -47,12 +41,6 @@ func archauxv(tag, val uintptr) {
randomNumber = uint32(startupRandomData[4]) | uint32(startupRandomData[5])<<8 |
uint32(startupRandomData[6])<<16 | uint32(startupRandomData[7])<<24
case _AT_PLATFORM: // v5l, v6l, v7l
t := *(*uint8)(unsafe.Pointer(val + 1))
if '5' <= t && t <= '7' {
armArch = t - '0'
}
case _AT_HWCAP:
cpu.HWCap = uint(val)
case _AT_HWCAP2: