aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2025-05-21 11:10:24 -0400
committerGopher Robot <gobot@golang.org>2025-05-21 11:05:32 -0700
commitd2f229db7a3da4157fd7602f77513ce85c01ff04 (patch)
treec7f8a419e439ed80502f0aeae0722badec1fc0f7 /src
parent304d9e2fd1b62d236eb48ec838be3680cb7845e6 (diff)
downloadgo-d2f229db7a3da4157fd7602f77513ce85c01ff04.tar.xz
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>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/race_s390x.s10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/race_s390x.s b/src/runtime/race_s390x.s
index a12bf8416b..3dfda9e733 100644
--- a/src/runtime/race_s390x.s
+++ b/src/runtime/race_s390x.s
@@ -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.