diff options
author | Wim <wim@42.be> | 2020-05-24 00:06:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 00:06:21 +0200 |
commit | 393f9e998b1b40aa59d3fb8794c3a73da38c3fb7 (patch) | |
tree | 2bc9b6e6abdbdc6d811b155997597bdae62bc7db /vendor/golang.org/x/sys/cpu | |
parent | ba0bfe70a8f07164e1341f4b094841acdad5c3a2 (diff) | |
download | matterbridge-msglm-393f9e998b1b40aa59d3fb8794c3a73da38c3fb7.tar.gz matterbridge-msglm-393f9e998b1b40aa59d3fb8794c3a73da38c3fb7.tar.bz2 matterbridge-msglm-393f9e998b1b40aa59d3fb8794c3a73da38c3fb7.zip |
Update dependencies / vendor (#1146)
Diffstat (limited to 'vendor/golang.org/x/sys/cpu')
-rw-r--r-- | vendor/golang.org/x/sys/cpu/cpu.go | 9 | ||||
-rw-r--r-- | vendor/golang.org/x/sys/cpu/cpu_arm64.go | 10 | ||||
-rw-r--r-- | vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go | 22 | ||||
-rw-r--r-- | vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go | 2 |
4 files changed, 39 insertions, 4 deletions
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go index b4e6ecb2..e44deb75 100644 --- a/vendor/golang.org/x/sys/cpu/cpu.go +++ b/vendor/golang.org/x/sys/cpu/cpu.go @@ -114,6 +114,15 @@ var ARM struct { _ CacheLinePad } +// MIPS64X contains the supported CPU features of the current mips64/mips64le +// platforms. If the current platform is not mips64/mips64le or the current +// operating system is not Linux then all feature flags are false. +var MIPS64X struct { + _ CacheLinePad + HasMSA bool // MIPS SIMD architecture + _ CacheLinePad +} + // PPC64 contains the supported CPU features of the current ppc64/ppc64le platforms. // If the current platform is not ppc64/ppc64le then all feature flags are false. // diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go index 6ac0b353..9c87677a 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -10,9 +10,13 @@ const cacheLineSize = 64 func init() { switch runtime.GOOS { - case "darwin": - // iOS does not seem to allow reading these registers - case "android", "linux": + case "android", "darwin": + // Android and iOS don't seem to allow reading these registers. + // Fake the minimal features expected by + // TestARM64minimalFeatures. + ARM64.HasASIMD = true + ARM64.HasFP = true + case "linux": doinit() default: readARM64Registers() diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go new file mode 100644 index 00000000..eb24e507 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go @@ -0,0 +1,22 @@ +// Copyright 2020 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. + +// +build mips64 mips64le + +package cpu + +// HWCAP bits. These are exposed by the Linux kernel 5.4. +const ( + // CPU features + hwcap_MIPS_MSA = 1 << 1 +) + +func doinit() { + // HWCAP feature bits + MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA) +} + +func isSet(hwc uint, value uint) bool { + return hwc&value != 0 +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go index f65134f6..42b5d33c 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux,!arm,!arm64,!ppc64,!ppc64le,!s390x +// +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x package cpu |