mirror of
https://github.com/golang/go
synced 2024-11-26 05:07:59 -07:00
[dev.typeparams] internal/bytealg: call memeqbody directly in memequal_varlen on ARM64
Currently, memequal_varlen opens up a frame and call memequal, which then tail-calls memeqbody. This CL changes memequal_varlen tail-calls memeqbody directly. This makes it simpler to switch to the register ABI in the next CL. Change-Id: Ia1367c0abb7f4755fe736c404411793fb9e5c04f Reviewed-on: https://go-review.googlesource.com/c/go/+/324399 Trust: Cherry Mui <cherryyz@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
165d39a1d4
commit
5a008a92e8
@ -20,20 +20,15 @@ equal:
|
||||
RET
|
||||
|
||||
// memequal_varlen(a, b unsafe.Pointer) bool
|
||||
TEXT runtime·memequal_varlen(SB),NOSPLIT,$40-17
|
||||
MOVD a+0(FP), R3
|
||||
MOVD b+8(FP), R4
|
||||
CMP R3, R4
|
||||
TEXT runtime·memequal_varlen(SB),NOSPLIT,$0-17
|
||||
MOVD a+0(FP), R0
|
||||
MOVD b+8(FP), R2
|
||||
CMP R0, R2
|
||||
BEQ eq
|
||||
MOVD 8(R26), R5 // compiler stores size at offset 8 in the closure
|
||||
CBZ R5, eq
|
||||
MOVD R3, 8(RSP)
|
||||
MOVD R4, 16(RSP)
|
||||
MOVD R5, 24(RSP)
|
||||
BL runtime·memequal(SB)
|
||||
MOVBU 32(RSP), R3
|
||||
MOVB R3, ret+16(FP)
|
||||
RET
|
||||
MOVD 8(R26), R1 // compiler stores size at offset 8 in the closure
|
||||
CBZ R1, eq
|
||||
MOVD $ret+16(FP), R8
|
||||
B memeqbody<>(SB)
|
||||
eq:
|
||||
MOVD $1, R3
|
||||
MOVB R3, ret+16(FP)
|
||||
|
Loading…
Reference in New Issue
Block a user