Sha256: 290f658b0d8e7e9dd93d3b908cd202f13b3a4f228071d4211f4e1947050dbbcc

Contents?: true

Size: 890 Bytes

Versions: 16

Compression:

Stored size: 890 Bytes

Contents

// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package cpu

const (
	// bit mask values from /usr/include/bits/hwcap.h
	hwcap_ZARCH  = 2
	hwcap_STFLE  = 4
	hwcap_MSA    = 8
	hwcap_LDISP  = 16
	hwcap_EIMM   = 32
	hwcap_DFP    = 64
	hwcap_ETF3EH = 256
	hwcap_VX     = 2048
	hwcap_VXE    = 8192
)

func initS390Xbase() {
	// test HWCAP bit vector
	has := func(featureMask uint) bool {
		return hwCap&featureMask == featureMask
	}

	// mandatory
	S390X.HasZARCH = has(hwcap_ZARCH)

	// optional
	S390X.HasSTFLE = has(hwcap_STFLE)
	S390X.HasLDISP = has(hwcap_LDISP)
	S390X.HasEIMM = has(hwcap_EIMM)
	S390X.HasETF3EH = has(hwcap_ETF3EH)
	S390X.HasDFP = has(hwcap_DFP)
	S390X.HasMSA = has(hwcap_MSA)
	S390X.HasVX = has(hwcap_VX)
	if S390X.HasVX {
		S390X.HasVXE = has(hwcap_VXE)
	}
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_snowflake_client-1.3.7 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.6 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.5 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.4 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.2 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.1 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.3.0 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.2.1 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.2.0 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.1.1 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.1.0 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.0.2 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.0.1 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go
ruby_snowflake_client-1.0.0 ext/vendor/golang.org/x/sys/cpu/cpu_linux_s390x.go