1
0
mirror of https://github.com/golang/go synced 2024-09-29 15:34:30 -06:00

runtime: remove unnecessary writes to gp.sched.g on loong64

Same as CL 292109, A g's sched.g is set in newproc1, After that, it never changes.
Yet lots of assembly code does "g.sched.g = g" unnecessarily. Remove it to avoid
confusion about whether it ever changes.

Change-Id: I3d3b18267a80bdd9ef5487c1d1d29de4c5a2d5cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/476375
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Guoqi Chen 2023-03-15 07:35:43 +08:00 committed by Gopher Robot
parent c52069361a
commit 579109789f

View File

@ -128,7 +128,6 @@ TEXT runtime·mcall(SB), NOSPLIT|NOFRAME, $0-8
MOVV R3, (g_sched+gobuf_sp)(g)
MOVV R1, (g_sched+gobuf_pc)(g)
MOVV R0, (g_sched+gobuf_lr)(g)
MOVV g, (g_sched+gobuf_g)(g)
// Switch to m->g0 & its stack, call fn.
MOVV g, R19