From: Meng Zhuo Date: Fri, 19 Feb 2021 06:31:57 +0000 (+0800) Subject: runtime: fix invalid nil g check for for mips64x X-Git-Tag: go1.17beta1~1481 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7764ee5614df2228e03326487af7670c7c5d268a;p=gostls13.git runtime: fix invalid nil g check for for mips64x In CL 292109 we removed unnecessary writes to gp.sched.g but put wrong register to save g (R4 saves pointer to g) on mips64x Change-Id: I9777846a7b0a46e1af83dcfc73b74649e0dba3c9 Reviewed-on: https://go-review.googlesource.com/c/go/+/293989 TryBot-Result: Go Bot Reviewed-by: Joel Sing Trust: Meng Zhuo Run-TryBot: Meng Zhuo --- diff --git a/src/runtime/asm_mips64x.s b/src/runtime/asm_mips64x.s index af27b9b555..c123e96a71 100644 --- a/src/runtime/asm_mips64x.s +++ b/src/runtime/asm_mips64x.s @@ -98,11 +98,11 @@ TEXT runtime·mstart(SB),NOSPLIT|TOPFRAME,$0 TEXT runtime·gogo(SB), NOSPLIT|NOFRAME, $0-8 MOVV buf+0(FP), R3 MOVV gobuf_g(R3), R4 - MOVV 0(R4), R5 // make sure g != nil + MOVV 0(R4), R0 // make sure g != nil JMP gogo<>(SB) TEXT gogo<>(SB), NOSPLIT|NOFRAME, $0 - MOVV R5, g + MOVV R4, g JAL runtime·save_g(SB) MOVV 0(g), R2