1
2
3
4
5 package cpu
6
7 func doinit() {
8 ARM.HasSWP = isSet(hwCap, hwcap_SWP)
9 ARM.HasHALF = isSet(hwCap, hwcap_HALF)
10 ARM.HasTHUMB = isSet(hwCap, hwcap_THUMB)
11 ARM.Has26BIT = isSet(hwCap, hwcap_26BIT)
12 ARM.HasFASTMUL = isSet(hwCap, hwcap_FAST_MULT)
13 ARM.HasFPA = isSet(hwCap, hwcap_FPA)
14 ARM.HasVFP = isSet(hwCap, hwcap_VFP)
15 ARM.HasEDSP = isSet(hwCap, hwcap_EDSP)
16 ARM.HasJAVA = isSet(hwCap, hwcap_JAVA)
17 ARM.HasIWMMXT = isSet(hwCap, hwcap_IWMMXT)
18 ARM.HasCRUNCH = isSet(hwCap, hwcap_CRUNCH)
19 ARM.HasTHUMBEE = isSet(hwCap, hwcap_THUMBEE)
20 ARM.HasNEON = isSet(hwCap, hwcap_NEON)
21 ARM.HasVFPv3 = isSet(hwCap, hwcap_VFPv3)
22 ARM.HasVFPv3D16 = isSet(hwCap, hwcap_VFPv3D16)
23 ARM.HasTLS = isSet(hwCap, hwcap_TLS)
24 ARM.HasVFPv4 = isSet(hwCap, hwcap_VFPv4)
25 ARM.HasIDIVA = isSet(hwCap, hwcap_IDIVA)
26 ARM.HasIDIVT = isSet(hwCap, hwcap_IDIVT)
27 ARM.HasVFPD32 = isSet(hwCap, hwcap_VFPD32)
28 ARM.HasLPAE = isSet(hwCap, hwcap_LPAE)
29 ARM.HasEVTSTRM = isSet(hwCap, hwcap_EVTSTRM)
30 ARM.HasAES = isSet(hwCap2, hwcap2_AES)
31 ARM.HasPMULL = isSet(hwCap2, hwcap2_PMULL)
32 ARM.HasSHA1 = isSet(hwCap2, hwcap2_SHA1)
33 ARM.HasSHA2 = isSet(hwCap2, hwcap2_SHA2)
34 ARM.HasCRC32 = isSet(hwCap2, hwcap2_CRC32)
35 }
36
37 func isSet(hwc uint, value uint) bool {
38 return hwc&value != 0
39 }
40
View as plain text