Source file
src/runtime/os_linux_arm.go
1
2
3
4
5 package runtime
6
7 import "internal/cpu"
8
9 const (
10 _HWCAP_VFP = 1 << 6
11 _HWCAP_VFPv3 = 1 << 13
12 )
13
14 func checkgoarm() {
15
16
17
18 if GOOS == "android" {
19 return
20 }
21 if goarm > 5 && cpu.HWCap&_HWCAP_VFP == 0 {
22 print("runtime: this CPU has no floating point hardware, so it cannot run\n")
23 print("this GOARM=", goarm, " binary. Recompile using GOARM=5.\n")
24 exit(1)
25 }
26 if goarm > 6 && cpu.HWCap&_HWCAP_VFPv3 == 0 {
27 print("runtime: this CPU has no VFPv3 floating point hardware, so it cannot run\n")
28 print("this GOARM=", goarm, " binary. Recompile using GOARM=5 or GOARM=6.\n")
29 exit(1)
30 }
31 }
32
33 func archauxv(tag, val uintptr) {
34 switch tag {
35 case _AT_HWCAP:
36 cpu.HWCap = uint(val)
37 case _AT_HWCAP2:
38 cpu.HWCap2 = uint(val)
39 }
40 }
41
42 func osArchInit() {}
43
44
45 func cputicks() int64 {
46
47
48 return nanotime()
49 }
50
View as plain text