Lines Matching +full:key +full:- +full:2
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * NH - ε-almost-universal hash function, x86_64 AVX2 accelerated
35 #define KEY %rdi macro
42 // Add message words to key words
68 * void nh_avx2(const u32 *key, const u8 *message, size_t message_len,
75 vmovdqu 0x00(KEY), K0
76 vmovdqu 0x10(KEY), K1
77 add $0x20, KEY
87 vmovdqu 0x00(KEY), K2
88 vmovdqu 0x10(KEY), K3
92 vmovdqu 0x20(KEY), K0
93 vmovdqu 0x30(KEY), K1
97 add $0x40, KEY
108 // 2 or 3 strides remain; do 2 more.
110 vmovdqu 0x00(KEY), K2
111 vmovdqu 0x10(KEY), K3
114 add $0x20, KEY
121 // don't affect the result when processing them like 2 strides.
125 vmovdqu 0x00(KEY), K2_XMM
126 vmovdqu 0x10(KEY), K3_XMM
134 // PASS2_SUMS is (2A 2B 2C 2D)
139 // 2A + 2B + 2C + 2D,
145 vpunpcklqdq PASS3_SUMS, PASS2_SUMS, T2 // T2 = (2A 3A 2C 3C)
146 vpunpckhqdq PASS3_SUMS, PASS2_SUMS, T3 // T3 = (2B 3B 2D 3D)
148 vinserti128 $0x1, T2_XMM, T0, T4 // T4 = (0A 1A 2A 3A)
149 vinserti128 $0x1, T3_XMM, T1, T5 // T5 = (0B 1B 2B 3B)
150 vperm2i128 $0x31, T2, T0, T0 // T0 = (0C 1C 2C 3C)
151 vperm2i128 $0x31, T3, T1, T1 // T1 = (0D 1D 2D 3D)