-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathquery_amd64.s
More file actions
43 lines (38 loc) · 783 Bytes
/
query_amd64.s
File metadata and controls
43 lines (38 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//go:build amd64 && !purego
// +build amd64,!purego
// Code generated by command: go run asm.go -out query_amd64.s. DO NOT EDIT.
#include "textflag.h"
// func queryCore(r *[8]uint64, bits [][8]uint64, hashes []uint32)
TEXT ·queryCore(SB), NOSPLIT, $0-56
MOVQ r+0(FP), AX
MOVQ bits_base+8(FP), CX
MOVQ hashes_base+32(FP), DX
MOVQ hashes_len+40(FP), BX
PCMPEQL X0, X0
PCMPEQL X1, X1
PCMPEQL X2, X2
PCMPEQL X3, X3
loop:
MOVL (DX), BP
SHLQ $0x06, BP
ADDQ CX, BP
PXOR X4, X4
PAND (BP), X0
PAND 16(BP), X1
PAND 32(BP), X2
PAND 48(BP), X3
POR X0, X4
POR X1, X4
POR X2, X4
POR X3, X4
PTEST X4, X4
JZ done
ADDQ $0x04, DX
SUBQ $0x01, BX
JNZ loop
done:
MOVOU X0, (AX)
MOVOU X1, 16(AX)
MOVOU X2, 32(AX)
MOVOU X3, 48(AX)
RET