Skip to content

Commit 20b1772

Browse files
committed
reflect: call ABIInternal moveMakeFuncArgPtrs on ARM64
Save some stack space, to avoid nosplit overflow in -race -N -l build. For #51247. Change-Id: I7357d6227f816a612a64f55f7ca1b1384e9268e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/386714 Trust: Cherry Mui <[email protected]> Run-TryBot: Cherry Mui <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent d35ed09 commit 20b1772

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/reflect/asm_arm64.s

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ TEXT ·makeFuncStub(SB),(NOSPLIT|WRAPPER),$432
3333
ADD $LOCAL_REGARGS, RSP, R20
3434
CALL runtime·spillArgs(SB)
3535
MOVD R26, 32(RSP) // outside of moveMakeFuncArgPtrs's arg area
36+
#ifdef GOEXPERIMENT_regabiargs
37+
MOVD R26, R0
38+
MOVD R20, R1
39+
#else
3640
MOVD R26, 8(RSP)
3741
MOVD R20, 16(RSP)
38-
CALL ·moveMakeFuncArgPtrs(SB)
42+
#endif
43+
CALL ·moveMakeFuncArgPtrs<ABIInternal>(SB)
3944
MOVD 32(RSP), R26
4045
MOVD R26, 8(RSP)
4146
MOVD $argframe+0(FP), R3
@@ -61,9 +66,14 @@ TEXT ·methodValueCall(SB),(NOSPLIT|WRAPPER),$432
6166
ADD $LOCAL_REGARGS, RSP, R20
6267
CALL runtime·spillArgs(SB)
6368
MOVD R26, 32(RSP) // outside of moveMakeFuncArgPtrs's arg area
69+
#ifdef GOEXPERIMENT_regabiargs
70+
MOVD R26, R0
71+
MOVD R20, R1
72+
#else
6473
MOVD R26, 8(RSP)
6574
MOVD R20, 16(RSP)
66-
CALL ·moveMakeFuncArgPtrs(SB)
75+
#endif
76+
CALL ·moveMakeFuncArgPtrs<ABIInternal>(SB)
6777
MOVD 32(RSP), R26
6878
MOVD R26, 8(RSP)
6979
MOVD $argframe+0(FP), R3

0 commit comments

Comments
 (0)