1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 _HWCAP_VFP = 1 << 6 // introduced in at least 2.6.11
14 _HWCAP_VFPv3 = 1 << 13 // introduced in 2.6.30
20 // On Android, /proc/self/auxv might be unreadable and hwcap won't
21 // reflect the CPU capabilities. Assume that every Android arm device
22 // has the necessary floating point hardware available.
23 if GOOS == "android" {
26 if goarm > 5 && cpu.HWCap&_HWCAP_VFP == 0 {
27 print("runtime: this CPU has no floating point hardware, so it cannot run\n")
28 print("this GOARM=", goarm, " binary. Recompile using GOARM=5.\n")
31 if goarm > 6 && cpu.HWCap&_HWCAP_VFPv3 == 0 {
32 print("runtime: this CPU has no VFPv3 floating point hardware, so it cannot run\n")
33 print("this GOARM=", goarm, " binary. Recompile using GOARM=5 or GOARM=6.\n")
38 func archauxv(tag, val uintptr) {
43 cpu.HWCap2 = uint(val)
45 cpu.Platform = gostringnocopy((*byte)(unsafe.Pointer(val)))
52 func cputicks() int64 {
53 // Currently cputicks() is used in blocking profiler and to seed fastrand().
54 // nanotime() is a poor approximation of CPU ticks that is enough for the profiler.