diff options
| author | Guoqi Chen <chenguoqi@loongson.cn> | 2025-06-05 19:23:55 +0800 |
|---|---|---|
| committer | abner chenc <chenguoqi@loongson.cn> | 2025-06-07 00:48:37 -0700 |
| commit | d184f8dc020ac635cea02c046ab1d0b87dfd624d (patch) | |
| tree | 9e82e4ac23206d8f445e7c835bd8d329683e1d2a | |
| parent | 0ccfbc834a489f92745613b2e06275c2cfe6ace0 (diff) | |
| download | go-d184f8dc020ac635cea02c046ab1d0b87dfd624d.tar.xz | |
runtime: check for gsignal in racecall on loong64
This issue has been fixed for amd64, arm64 and other platforms
in CL 643875, but it was missed when the race support was
submitted for loong64.
Fixes #71395.
Change-Id: I678f381e868214f1b3399be43187db49e1660933
Reviewed-on: https://go-review.googlesource.com/c/go/+/679055
Reviewed-by: Meidan Li <limeidan@loongson.cn>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: sophie zhao <zhaoxiaolin@loongson.cn>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
| -rw-r--r-- | src/runtime/race_loong64.s | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/runtime/race_loong64.s b/src/runtime/race_loong64.s index 597e0cc6b9..d731871d44 100644 --- a/src/runtime/race_loong64.s +++ b/src/runtime/race_loong64.s @@ -461,8 +461,13 @@ TEXT racecall<>(SB), NOSPLIT|NOFRAME, $0-0 // Switch to g0 stack. MOVV R3, R23 // callee-saved, preserved across the CALL MOVV R1, R24 // callee-saved, preserved across the CALL + + // Switch to g0 stack if we aren't already on g0 or gsignal. + MOVV m_gsignal(R12), R13 + BEQ R13, g, call + MOVV m_g0(R12), R13 - BEQ R13, g, call // already on g0 + BEQ R13, g, call MOVV (g_sched+gobuf_sp)(R13), R3 call: JAL (RCALL) |
