runtime: avoid register clobber in s390x racecall

This is a regression in CL 643875. Loading gsignal clobbers R8, which
contains the m pointer needed for loading g0.

For #71395.

Change-Id: I6a6a636ca95442767efe0eb1b358f2139d18c5b8
Reviewed-on: https://go-review.googlesource.com/c/go/+/675035
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
Michael Pratt 2025-05-21 11:10:24 -04:00 committed by Gopher Robot
parent 304d9e2fd1
commit d2f229db7a
1 changed files with 5 additions and 5 deletions

View File

@ -412,13 +412,13 @@ TEXT racecall<>(SB), NOSPLIT, $0-0
MOVD g_m(g), R8 // R8 = thread.
// Switch to g0 stack if we aren't already on g0 or gsignal.
MOVD m_gsignal(R8), R8
CMPBEQ R8, g, call
MOVD m_gsignal(R8), R9
CMPBEQ R9, g, call
MOVD m_g0(R8), R8
CMPBEQ R8, g, call
MOVD m_g0(R8), R9
CMPBEQ R9, g, call
MOVD (g_sched+gobuf_sp)(R8), R15 // Switch SP to g0.
MOVD (g_sched+gobuf_sp)(R9), R15 // Switch SP to g0.
call: SUB $160, R15 // Allocate C frame.
BL R1 // Call C code.