1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
10 // func memequal(a, b unsafe.Pointer, size uintptr) bool
11 TEXT runtime·memequal<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-25
17 // func memequal_varlen(a, b unsafe.Pointer) bool
18 TEXT runtime·memequal_varlen<ABIInternal>(SB),NOSPLIT|NOFRAME,$0-17
19 MOV 8(CTXT), X12 // compiler stores size at offset 8 in the closure
24 // On entry X10 and X11 contain pointers, X12 contains length.
25 // For non-regabi X13 contains address for return value.
26 // For regabi return value in X10.
27 TEXT memequal<>(SB),NOSPLIT|NOFRAME,$0
31 BLT X12, X23, loop4_check
33 // Check alignment - if alignment differs we have to do one byte at a time.
36 BNE X9, X19, loop4_check
39 // Check one byte at a time until we reach 8 byte alignment.
54 BLT X12, X9, loop16_check
76 BLT X12, X23, loop4_check