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 <[email protected]>
Reviewed-by: WANG Xuerui <[email protected]>
Run-TryBot: Wayne Zuo <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: xiaodong liu <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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.