This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 1/2] Sync hardware facility names with other files in os_linux_s390x.go
- From: Andreas Krebbel <krebbel at linux dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Oct 2019 11:08:48 +0200
- Subject: [PATCH 1/2] Sync hardware facility names with other files in os_linux_s390x.go
- References: <CAOyqgcUedUm1bF5exo-tpV53=_v1WFyz3GFR4ONP9GMuEn0+3g@mail.gmail.com>
2019-10-14 Andreas Krebbel <krebbel@linux.ibm.com>
* libgo/go/runtime/os_linux_s390x.go: cpu.go, cpu_s390x.go,
cpu.go, and cpu_linux_s390x.go expect the hardware facilities in
capital letters. Sync this file accordingly. Add support for the
VXE HWCAP as well.
---
libgo/go/runtime/os_linux_s390x.go | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/libgo/go/runtime/os_linux_s390x.go b/libgo/go/runtime/os_linux_s390x.go
index 7640273e202..46fe817c6dd 100644
--- a/libgo/go/runtime/os_linux_s390x.go
+++ b/libgo/go/runtime/os_linux_s390x.go
@@ -16,18 +16,20 @@ const (
_HWCAP_S390_DFP = 64
_HWCAP_S390_ETF3EH = 256
_HWCAP_S390_VX = 2048 // vector facility
+ _HWCAP_S390_VXE = 8192
)
func archauxv(tag, val uintptr) {
switch tag {
case _AT_HWCAP: // CPU capability bit flags
- cpu.S390X.HasZArch = val&_HWCAP_S390_ZARCH != 0
+ cpu.S390X.HasZARCH = val&_HWCAP_S390_ZARCH != 0
cpu.S390X.HasSTFLE = val&_HWCAP_S390_STFLE != 0
- cpu.S390X.HasMSA = val&_HWCAP_S390_MSA != 0
- cpu.S390X.HasLDisp = val&_HWCAP_S390_LDISP != 0
- cpu.S390X.HasEImm = val&_HWCAP_S390_EIMM != 0
+ cpu.S390X.HasLDISP = val&_HWCAP_S390_LDISP != 0
+ cpu.S390X.HasEIMM = val&_HWCAP_S390_EIMM != 0
cpu.S390X.HasDFP = val&_HWCAP_S390_DFP != 0
- cpu.S390X.HasETF3Enhanced = val&_HWCAP_S390_ETF3EH != 0
+ cpu.S390X.HasETF3EH = val&_HWCAP_S390_ETF3EH != 0
+ cpu.S390X.HasMSA = val&_HWCAP_S390_MSA != 0
cpu.S390X.HasVX = val&_HWCAP_S390_VX != 0
+ cpu.S390X.HasVXE = val&_HWCAP_S390_VXE != 0
}
}
--
2.23.0