aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/asm_s390x.s
diff options
context:
space:
mode:
authorMichael Munday <munday@ca.ibm.com>2016-09-08 19:27:24 -0400
committerMichael Munday <munday@ca.ibm.com>2016-09-09 00:34:22 +0000
commitd38d59ffb5d56c838b1ed7cc346b8d63398b5452 (patch)
treef38df1597e7d85529145a46c3419e0bb8445b41f /src/runtime/asm_s390x.s
parent14ff7cc94c4e167dbd80c96996b43f96bb9c17fb (diff)
downloadgo-d38d59ffb5d56c838b1ed7cc346b8d63398b5452.tar.gz
go-d38d59ffb5d56c838b1ed7cc346b8d63398b5452.zip
runtime: fix SIGILL in checkvectorfacility on s390x
STFLE does not necessarily write to all the double-words that are requested. It is therefore necessary to clear the target memory before calling STFLE in order to ensure that the facility list does not contain false positives. Fixes #17032. Change-Id: I7bec9ade7103e747b72f08562fe57e6f091bd89f Reviewed-on: https://go-review.googlesource.com/28850 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/runtime/asm_s390x.s')
-rw-r--r--src/runtime/asm_s390x.s1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/asm_s390x.s b/src/runtime/asm_s390x.s
index cf0ed1a917..928fe37121 100644
--- a/src/runtime/asm_s390x.s
+++ b/src/runtime/asm_s390x.s
@@ -20,6 +20,7 @@ TEXT runtime·checkvectorfacility(SB),NOSPLIT,$32-0
MOVD $2, R0
MOVD R1, tmp-32(SP)
MOVD $x-24(SP), R1
+ XC $24, 0(R1), 0(R1)
// STFLE 0(R1)
WORD $0xB2B01000
MOVBZ z-8(SP), R1