erigon-pulse/consensus/ethash/fnv_hash16_avx2.s
Andrew Ashikhmin ebdac3a192
AVX2 fnvHash. Bump numOfGoroutines to 8 in stage_senders.go (#656)
* Profile all stages

* Try to recover senders with 8 goroutines

* fix CPU profiling for stage_bodies

* fix out-of-index

* Try full DAG for verfication of header seals

* Try to unroll fnvHash for performance

* SSE2 assembly for fnvHash16

* fnvHash16AVX2

* Revert changes to state.go

* check we're on 64-bit in useAVX2

* Shave a move off fnvHash16AVX2

* asmdecl doesn't know about VMOVD

* disable linter in the right place
2020-06-12 12:48:59 +01:00

22 lines
352 B
ArmAsm

#include "textflag.h"
// func fnvHash16AVX2(data, mix *uint32, prime uint32)
TEXT ·fnvHash16AVX2(SB), NOSPLIT, $0
MOVQ data+0(FP), AX
MOVQ mix+8(FP), BX
VMOVD prime+16(FP), X0
VPBROADCASTD X0, Y0
VPMULLD (AX), Y0, Y1
VPXOR (BX), Y1, Y1
VMOVDQU Y1, (AX)
VPMULLD 32(AX), Y0, Y0
VPXOR 32(BX), Y0, Y0
VMOVDQU Y0, 32(AX)
VZEROUPPER
RET