Commit 0324a3f8 authored by Michael Munday's avatar Michael Munday

runtime/cgo: restore the g pointer correctly in crosscall_s390x

R13 needs to be set to g because C code may have clobbered R13.

Fixes #16006.

Change-Id: I66311fe28440e85e589a1695fa1c42416583b4c6
Reviewed-on: https://go-review.googlesource.com/23910Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 09eedc32
......@@ -21,9 +21,12 @@ crosscall_s390x:
stdy %f4, 144(%r15)
stdy %f6, 152(%r15)
/* assumes this call does not clobber r2 or r15 */
/* set r0 to 0 */
xgr %r0, %r0
/* restore g pointer */
lgr %r13, %r3
/* grow stack 8 bytes and call fn */
agfi %r15, -8
basr %r14, %r2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment