1 // Copyright 2026 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.
4
5 //go:build !goexperiment.simd
6
7 #include "textflag.h"
8
9 // func memHash32AES(p unsafe.Pointer, h uintptr) uintptr
10 // ABIInternal for performance.
11 TEXT ·memHash32AES<ABIInternal>(SB),NOSPLIT,$0-24
12 // AX = ptr to data
13 // BX = seed
14 MOVQ BX, X0 // X0 = seed
15 PINSRD $2, (AX), X0 // data
16 AESENC ·aeskeysched+0(SB), X0
17 AESENC ·aeskeysched+16(SB), X0
18 AESENC ·aeskeysched+32(SB), X0
19 MOVQ X0, AX // return X0
20 RET
21
22 // func memHash64AES(p unsafe.Pointer, h uintptr) uintptr
23 // ABIInternal for performance.
24 TEXT ·memHash64AES<ABIInternal>(SB),NOSPLIT,$0-24
25 // AX = ptr to data
26 // BX = seed
27 MOVQ BX, X0 // X0 = seed
28 PINSRQ $1, (AX), X0 // data
29 AESENC ·aeskeysched+0(SB), X0
30 AESENC ·aeskeysched+16(SB), X0
31 AESENC ·aeskeysched+32(SB), X0
32 MOVQ X0, AX // return X0
33 RET
34
View as plain text