Skip to content

Commit

Permalink
runtime: remove unnecessary argument stores for panicIndex etc. on ARM64
Browse files Browse the repository at this point in the history
If register ABI is used, no need to store the arguments to stack.
I forgot them in CL 323937.

Change-Id: I888af2b547a8fc97d13716bc8e8f3acd5c5bc127
Reviewed-on: https://go-review.googlesource.com/c/go/+/351609
Trust: Cherry Mui <[email protected]>
Run-TryBot: Cherry Mui <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: David Chase <[email protected]>
  • Loading branch information
cherrymui committed Oct 29, 2021
1 parent 4592933 commit 5ec139f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/runtime/asm_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -1383,12 +1383,16 @@ flush:
// Defined as ABIInternal since the compiler generates ABIInternal
// calls to it directly and it does not use the stack-based Go ABI.
TEXT runtime·panicIndex<ABIInternal>(SB),NOSPLIT,$0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD R0, x+0(FP)
MOVD R1, y+8(FP)
#endif
JMP runtime·goPanicIndex<ABIInternal>(SB)
TEXT runtime·panicIndexU<ABIInternal>(SB),NOSPLIT,$0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD R0, x+0(FP)
MOVD R1, y+8(FP)
#endif
JMP runtime·goPanicIndexU<ABIInternal>(SB)
TEXT runtime·panicSliceAlen<ABIInternal>(SB),NOSPLIT,$0-16
#ifdef GOEXPERIMENT_regabiargs
Expand Down Expand Up @@ -1427,12 +1431,16 @@ TEXT runtime·panicSliceAcapU<ABIInternal>(SB),NOSPLIT,$0-16
#endif
JMP runtime·goPanicSliceAcapU<ABIInternal>(SB)
TEXT runtime·panicSliceB<ABIInternal>(SB),NOSPLIT,$0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD R0, x+0(FP)
MOVD R1, y+8(FP)
#endif
JMP runtime·goPanicSliceB<ABIInternal>(SB)
TEXT runtime·panicSliceBU<ABIInternal>(SB),NOSPLIT,$0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD R0, x+0(FP)
MOVD R1, y+8(FP)
#endif
JMP runtime·goPanicSliceBU<ABIInternal>(SB)
TEXT runtime·panicSlice3Alen<ABIInternal>(SB),NOSPLIT,$0-16
#ifdef GOEXPERIMENT_regabiargs
Expand Down Expand Up @@ -1489,12 +1497,16 @@ TEXT runtime·panicSlice3BU<ABIInternal>(SB),NOSPLIT,$0-16
#endif
JMP runtime·goPanicSlice3BU<ABIInternal>(SB)
TEXT runtime·panicSlice3C<ABIInternal>(SB),NOSPLIT,$0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD R0, x+0(FP)
MOVD R1, y+8(FP)
#endif
JMP runtime·goPanicSlice3C<ABIInternal>(SB)
TEXT runtime·panicSlice3CU<ABIInternal>(SB),NOSPLIT,$0-16
#ifndef GOEXPERIMENT_regabiargs
MOVD R0, x+0(FP)
MOVD R1, y+8(FP)
#endif
JMP runtime·goPanicSlice3CU<ABIInternal>(SB)
TEXT runtime·panicSliceConvert<ABIInternal>(SB),NOSPLIT,$0-16
#ifdef GOEXPERIMENT_regabiargs
Expand Down

0 comments on commit 5ec139f

Please sign in to comment.