From: Guoqi Chen Date: Tue, 14 Mar 2023 23:35:43 +0000 (+0800) Subject: runtime: remove unnecessary writes to gp.sched.g on loong64 X-Git-Tag: go1.21rc1~1120 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=579109789fbb03132ae43c501add94f295d1642e;p=gostls13.git 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 Auto-Submit: Wayne Zuo Reviewed-by: WANG Xuerui Run-TryBot: Wayne Zuo TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui --- diff --git a/src/runtime/asm_loong64.s b/src/runtime/asm_loong64.s index d2b15144e0..b2aa5efea6 100644 --- a/src/runtime/asm_loong64.s +++ b/src/runtime/asm_loong64.s @@ -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