]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove the fake mstart caller in systemstack on linux/loong64
authorGuoqi Chen <chenguoqi@loongson.cn>
Mon, 4 Jul 2022 06:29:52 +0000 (14:29 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 17 Mar 2023 06:57:16 +0000 (06:57 +0000)
The backtrace knows to stop in the system stack due to writing to the SP,
so here the fake mstart caller in the system stack is no longer needed and
can be removed

ref. CL 288799

Change-Id: I0841e75fd515cf6a0d98abe4cffc3f63fc275e0e
Reviewed-on: https://go-review.googlesource.com/c/go/+/416035
Auto-Submit: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/runtime/asm_loong64.s

index a64b0adf9cbcfbb86e39c11bf150fc5fb7468fb9..e226bda36f5c05b7ea41e877958365b3214d07fd 100644 (file)
@@ -186,10 +186,6 @@ switch:
        MOVV    R5, g
        JAL     runtime·save_g(SB)
        MOVV    (g_sched+gobuf_sp)(g), R19
-       // make it look like mstart called systemstack on g0, to stop traceback
-       ADDV    $-8, R19
-       MOVV    $runtime·mstart(SB), R6
-       MOVV    R6, 0(R19)
        MOVV    R19, R3
 
        // call target function