From f8aecbbff5b85e67fee95033b3a14f3df665ea18 Mon Sep 17 00:00:00 2001 From: Martin Möhrmann Date: Tue, 20 Oct 2020 14:21:07 +0200 Subject: runtime: move s390x HWCap CPU feature detection to internal/cpu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I7d9e31c3b342731ddd7329962426fdfc80e9ed87 Reviewed-on: https://go-review.googlesource.com/c/go/+/263803 Trust: Martin Möhrmann Run-TryBot: Martin Möhrmann TryBot-Result: Go Bot Reviewed-by: Tobias Klauser --- src/runtime/os_linux_s390x.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/runtime/os_linux_s390x.go') diff --git a/src/runtime/os_linux_s390x.go b/src/runtime/os_linux_s390x.go index ee18fd1dc2..b9651f186c 100644 --- a/src/runtime/os_linux_s390x.go +++ b/src/runtime/os_linux_s390x.go @@ -6,15 +6,10 @@ package runtime import "internal/cpu" -const ( - // bit masks taken from bits/hwcap.h - _HWCAP_S390_VX = 2048 // vector facility -) - func archauxv(tag, val uintptr) { switch tag { - case _AT_HWCAP: // CPU capability bit flags - cpu.S390X.HasVX = val&_HWCAP_S390_VX != 0 + case _AT_HWCAP: + cpu.HWCap = uint(val) } } -- cgit v1.3