This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/2] Sync hardware facility names with other files in os_linux_s390x.go


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]