Skip to content

Commit b5c8ae9

Browse files
abner-chencmengzhuo
authored andcommitted
runtime: mark morestack_noctxt SPWRITE for linux/loong64
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]>
1 parent 574c620 commit b5c8ae9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/runtime/asm_loong64.s

+7
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,13 @@ TEXT runtime·morestack(SB),NOSPLIT|NOFRAME,$0-0
266266
UNDEF
267267

268268
TEXT runtime·morestack_noctxt(SB),NOSPLIT|NOFRAME,$0-0
269+
// Force SPWRITE. This function doesn't actually write SP,
270+
// but it is called with a special calling convention where
271+
// the caller doesn't save LR on stack but passes it as a
272+
// register (R5), and the unwinder currently doesn't understand.
273+
// Make it SPWRITE to stop unwinding. (See issue 54332)
274+
MOVV R3, R3
275+
269276
MOVV R0, REGCTXT
270277
JMP runtime·morestack(SB)
271278

0 commit comments

Comments
 (0)