aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-10-25 23:18:41 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-10-25 23:18:41 +0000
commit0cec14923830569b8727d461bcf64adaf965de83 (patch)
tree39212625ea993fb193b64da0b13d64cd323dc23b /libgo
parentf67dc76907675065f34ed0bd14915df8d0b63b2d (diff)
parent9bdc2a8f06cef54650798fcb4c343e4415fd5992 (diff)
downloadgcc-0cec14923830569b8727d461bcf64adaf965de83.zip
gcc-0cec14923830569b8727d461bcf64adaf965de83.tar.gz
gcc-0cec14923830569b8727d461bcf64adaf965de83.tar.bz2
Merge from trunk revision 277462.
From-SVN: r277464
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/internal/cpu/cpu_gccgo.c15
-rw-r--r--libgo/go/runtime/os_linux_s390x.go12
2 files changed, 22 insertions, 5 deletions
diff --git a/libgo/go/internal/cpu/cpu_gccgo.c b/libgo/go/internal/cpu/cpu_gccgo.c
index ed0e7bff..6b40f01 100644
--- a/libgo/go/internal/cpu/cpu_gccgo.c
+++ b/libgo/go/internal/cpu/cpu_gccgo.c
@@ -184,4 +184,19 @@ struct queryResult klmdQuery() {
return ret;
}
+struct queryResult kdsaQuery(void)
+ __asm__(GOSYM_PREFIX "internal..z2fcpu.kdsaQuery")
+ __attribute__((no_split_stack));
+
+struct queryResult kdsaQuery() {
+ struct queryResult ret;
+
+ __asm__ ("lghi %%r0, 0\t\n" // set function code to 0 (KDSA-Query)
+ "la %%r1, %[ret]\t\n"
+ ".long 0xb93a0024\t\n" // kdsa
+ :[ret] "=QRST" (ret) : : "r0", "r1", "cc");
+
+ return ret;
+}
+
#endif /* defined(__s390x__) */
diff --git a/libgo/go/runtime/os_linux_s390x.go b/libgo/go/runtime/os_linux_s390x.go
index 7640273..46fe817 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
}
}