1
2
3
4
5 package cpu
6
7 const (
8
9 hwcap_ZARCH = 2
10 hwcap_STFLE = 4
11 hwcap_MSA = 8
12 hwcap_LDISP = 16
13 hwcap_EIMM = 32
14 hwcap_DFP = 64
15 hwcap_ETF3EH = 256
16 hwcap_VX = 2048
17 hwcap_VXE = 8192
18 )
19
20 func initS390Xbase() {
21
22 has := func(featureMask uint) bool {
23 return hwCap&featureMask == featureMask
24 }
25
26
27 S390X.HasZARCH = has(hwcap_ZARCH)
28
29
30 S390X.HasSTFLE = has(hwcap_STFLE)
31 S390X.HasLDISP = has(hwcap_LDISP)
32 S390X.HasEIMM = has(hwcap_EIMM)
33 S390X.HasETF3EH = has(hwcap_ETF3EH)
34 S390X.HasDFP = has(hwcap_DFP)
35 S390X.HasMSA = has(hwcap_MSA)
36 S390X.HasVX = has(hwcap_VX)
37 if S390X.HasVX {
38 S390X.HasVXE = has(hwcap_VXE)
39 }
40 }
41
View as plain text