...
Source file src/pkg/vendor/golang.org/x/sys/cpu/cpu_aix_ppc64.go
1
2
3
4
5
6
7 package cpu
8
9 const cacheLineSize = 128
10
11 const (
12
13 _SC_IMPL = 2
14 _IMPL_POWER8 = 0x10000
15 _IMPL_POWER9 = 0x20000
16 )
17
18 func init() {
19 impl := getsystemcfg(_SC_IMPL)
20 if impl&_IMPL_POWER8 != 0 {
21 PPC64.IsPOWER8 = true
22 }
23 if impl&_IMPL_POWER9 != 0 {
24 PPC64.IsPOWER9 = true
25 }
26
27 Initialized = true
28 }
29
30 func getsystemcfg(label int) (n uint64) {
31 r0, _ := callgetsystemcfg(label)
32 n = uint64(r0)
33 return
34 }
35
View as plain text