Skip to content

Commit

Permalink
runtime: mark morestack_noctxt SPWRITE for linux/loong64
Browse files Browse the repository at this point in the history
ref. CL 425396

Updates golang#54332.

Change-Id: I1a235b0cca4dbf79cf61cf5f40b594fc2d940857
Reviewed-on: https://go-review.googlesource.com/c/go/+/446895
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: WANG Xuerui <git@xen0n.name>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: xiaodong liu <teaofmoli@gmail.com>
  • Loading branch information
abner-chenc authored and mengzhuo committed Mar 15, 2023
1 parent 574c620 commit b5c8ae9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/runtime/asm_loong64.s
Expand Up @@ -266,6 +266,13 @@ TEXT runtime·morestack(SB),NOSPLIT|NOFRAME,$0-0
UNDEF

TEXT runtime·morestack_noctxt(SB),NOSPLIT|NOFRAME,$0-0
// Force SPWRITE. This function doesn't actually write SP,
// but it is called with a special calling convention where
// the caller doesn't save LR on stack but passes it as a
// register (R5), and the unwinder currently doesn't understand.
// Make it SPWRITE to stop unwinding. (See issue 54332)
MOVV R3, R3

MOVV R0, REGCTXT
JMP runtime·morestack(SB)

Expand Down

0 comments on commit b5c8ae9

Please sign in to comment.