...

Text file src/internal/runtime/maps/memhash_nosimd_amd64.s

Documentation: internal/runtime/maps

     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(k uint32, h uintptr) uintptr
    10// ABIInternal for performance.
    11TEXT ·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(k uint64, h uintptr) uintptr
    23// ABIInternal for performance.
    24TEXT ·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

View as plain text