mldsa_gh 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +88 -0
- data/ext/mldsa_gh_native/extconf.rb +14 -0
- data/ext/mldsa_gh_native/mldsa_gh_native.c +222 -0
- data/ext/mldsa_gh_native/mldsa_gh_native_all.c +24 -0
- data/ext/mldsa_gh_native/mldsa_gh_native_all.h +26 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/BUILDING.md +108 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/LICENSE +305 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/README.md +247 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/README.md +23 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native.c +803 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native.h +956 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native_asm.S +830 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native_config.h +855 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/cbmc.h +233 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/common.h +301 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/context.h +152 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/ct.c +21 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/ct.h +373 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/debug.c +75 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/debug.h +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202.c +270 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202.h +224 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +187 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +510 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +110 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +85 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +69 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +378 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +207 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +262 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_scalar_hybrid_aarch64_asm.S +1080 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x4_v8a_v84a_scalar_hybrid_aarch64_asm.S +990 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +47 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +27 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +36 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +40 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +32 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +37 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/api.h +129 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/README.md +10 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +67 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +37 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +717 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +42 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_extract_bytes_mve.S +334 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_xor_bytes_mve.S +355 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +53 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +35 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +34 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +45 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +488 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccakf1600_constants.c +52 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +314 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +248 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +367 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_intt_aarch64_asm.S +786 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_ntt_aarch64_asm.S +686 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_pointwise_montgomery_aarch64_asm.S +106 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_caddq_aarch64_asm.S +69 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_chknorm_aarch64_asm.S +76 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_32_aarch64_asm.S +108 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_88_aarch64_asm.S +108 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_32_aarch64_asm.S +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_88_aarch64_asm.S +133 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S +157 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S +173 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S +205 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_17_aarch64_asm.S +103 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_19_aarch64_asm.S +100 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_aarch64_asm.S +222 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta2_aarch64_asm.S +170 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta4_aarch64_asm.S +163 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +52 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +547 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +63 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/api.h +617 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/meta.h +24 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +323 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +330 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +157 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +27 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_intt_avx2_asm.S +2333 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_ntt_avx2_asm.S +2405 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_nttunpack_avx2_asm.S +254 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l4_avx2_asm.S +173 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l5_avx2_asm.S +189 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l7_avx2_asm.S +221 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_avx2_asm.S +158 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_caddq_avx2_asm.S +199 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_chknorm_avx2_asm.S +176 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_32_avx2_asm.S +490 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_88_avx2_asm.S +489 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_32_avx2_asm.S +123 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_88_avx2_asm.S +125 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_17_avx2_asm.S +355 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_19_avx2_asm.S +355 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_avx2_asm.S +132 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta2_avx2_asm.S +205 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta4_avx2_asm.S +176 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +161 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/packing.c +213 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/packing.h +277 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/params.h +153 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly.c +1066 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly.h +464 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly_kl.c +910 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly_kl.h +367 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec.c +509 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec.h +435 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +311 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +652 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/randombytes.h +26 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/reduce.h +144 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/rounding.h +265 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sign.c +1720 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sign.h +850 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/symmetric.h +68 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sys.h +327 -0
- data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/zetas.inc +55 -0
- data/lib/mldsa/parameter_set.rb +82 -0
- data/lib/mldsa/signing_key.rb +147 -0
- data/lib/mldsa/verify_key.rb +72 -0
- data/lib/mldsa/version.rb +7 -0
- data/lib/mldsa_gh.rb +93 -0
- metadata +225 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) The mldsa-native project authors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* References
|
|
7
|
+
* ==========
|
|
8
|
+
*
|
|
9
|
+
* - [REF_AVX2]
|
|
10
|
+
* CRYSTALS-Dilithium optimized AVX2 implementation
|
|
11
|
+
* Bai, Ducas, Kiltz, Lepoint, Lyubashevsky, Schwabe, Seiler, Stehlé
|
|
12
|
+
* https://github.com/pq-crystals/dilithium/tree/master/avx2
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* This file is derived from the public domain
|
|
17
|
+
* AVX2 Dilithium implementation @[REF_AVX2].
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/*yaml
|
|
22
|
+
Name: poly_use_hint_88_avx2_asm
|
|
23
|
+
Description: x86_64 AVX2 hint application (alpha = (Q-1)/88).
|
|
24
|
+
Use the hint polynomial h to correct the high bits of the polynomial a,
|
|
25
|
+
in place. Variant for parameter set ML-DSA-44 (GAMMA2 = (Q-1)/88).
|
|
26
|
+
Signature: void mld_poly_use_hint_88_avx2_asm(int32_t *a, const int32_t *h)
|
|
27
|
+
ABI:
|
|
28
|
+
Architecture: x86_64
|
|
29
|
+
CallingConvention: SysV
|
|
30
|
+
Features: [AVX2]
|
|
31
|
+
rdi:
|
|
32
|
+
type: buffer
|
|
33
|
+
size_bytes: 1024
|
|
34
|
+
permissions: read/write
|
|
35
|
+
c_parameter: int32_t *a
|
|
36
|
+
description: Input/output polynomial (256 x int32_t)
|
|
37
|
+
rsi:
|
|
38
|
+
type: buffer
|
|
39
|
+
size_bytes: 1024
|
|
40
|
+
permissions: read-only
|
|
41
|
+
c_parameter: const int32_t *h
|
|
42
|
+
description: Hint polynomial (256 x int32_t)
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
#include "../../../common.h"
|
|
46
|
+
|
|
47
|
+
#if defined(MLD_ARITH_BACKEND_X86_64_DEFAULT) && \
|
|
48
|
+
!defined(MLD_CONFIG_NO_VERIFY_API) && \
|
|
49
|
+
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED) && \
|
|
50
|
+
(defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
|
|
51
|
+
MLD_CONFIG_PARAMETER_SET == 44)
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* WARNING: This file is auto-derived from the mldsa-native source file
|
|
55
|
+
* dev/x86_64/src/mldsa_poly_use_hint_88_avx2_asm.S using scripts/simpasm. Do not modify it directly.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
.text
|
|
59
|
+
.balign 4
|
|
60
|
+
.global MLD_ASM_NAMESPACE(poly_use_hint_88_avx2_asm)
|
|
61
|
+
MLD_ASM_FN_SYMBOL(poly_use_hint_88_avx2_asm)
|
|
62
|
+
|
|
63
|
+
.cfi_startproc
|
|
64
|
+
movl $0x7f, %ecx
|
|
65
|
+
xorl %eax, %eax
|
|
66
|
+
vpxor %xmm5, %xmm5, %xmm5
|
|
67
|
+
movl $0x2c0b, %r8d # imm = 0x2C0B
|
|
68
|
+
vmovd %r8d, %xmm8
|
|
69
|
+
vpbroadcastd %xmm8, %ymm8
|
|
70
|
+
vmovd %ecx, %xmm4
|
|
71
|
+
movl $0x7e6c00, %ecx # imm = 0x7E6C00
|
|
72
|
+
movl $0x80, %r9d
|
|
73
|
+
vmovd %r9d, %xmm7
|
|
74
|
+
vpbroadcastd %xmm7, %ymm7
|
|
75
|
+
movl $0x2b, %r10d
|
|
76
|
+
vmovd %r10d, %xmm6
|
|
77
|
+
vpbroadcastd %xmm6, %ymm6
|
|
78
|
+
vmovd %ecx, %xmm3
|
|
79
|
+
vpbroadcastd %xmm4, %ymm4
|
|
80
|
+
vpbroadcastd %xmm3, %ymm3
|
|
81
|
+
|
|
82
|
+
Lmld_poly_use_hint_88_avx2_asm_loop:
|
|
83
|
+
vmovdqa (%rdi), %ymm0
|
|
84
|
+
vmovdqa (%rsi), %ymm1
|
|
85
|
+
vpaddd %ymm0, %ymm4, %ymm10
|
|
86
|
+
vpsrld $0x7, %ymm10, %ymm10
|
|
87
|
+
vpmulhuw %ymm8, %ymm10, %ymm10
|
|
88
|
+
vpmulhrsw %ymm7, %ymm10, %ymm10
|
|
89
|
+
vpcmpgtd %ymm3, %ymm0, %ymm11
|
|
90
|
+
vpandn %ymm10, %ymm11, %ymm9
|
|
91
|
+
vpslld $0x1, %ymm10, %ymm12
|
|
92
|
+
vpaddd %ymm10, %ymm12, %ymm12
|
|
93
|
+
vpslld $0x5, %ymm12, %ymm10
|
|
94
|
+
vpsubd %ymm12, %ymm10, %ymm10
|
|
95
|
+
vpslld $0xb, %ymm10, %ymm10
|
|
96
|
+
vpsubd %ymm10, %ymm0, %ymm0
|
|
97
|
+
vpaddd %ymm11, %ymm0, %ymm0
|
|
98
|
+
vpcmpgtd %ymm5, %ymm0, %ymm0
|
|
99
|
+
vpandn %ymm1, %ymm0, %ymm0
|
|
100
|
+
vpslld $0x1, %ymm0, %ymm0
|
|
101
|
+
vpsubd %ymm0, %ymm1, %ymm0
|
|
102
|
+
vpaddd %ymm9, %ymm0, %ymm0
|
|
103
|
+
vpblendvb %ymm0, %ymm6, %ymm0, %ymm0
|
|
104
|
+
vpcmpgtd %ymm6, %ymm0, %ymm1
|
|
105
|
+
vpandn %ymm0, %ymm1, %ymm0
|
|
106
|
+
vmovdqa %ymm0, (%rdi)
|
|
107
|
+
addq $0x20, %rdi
|
|
108
|
+
addq $0x20, %rsi
|
|
109
|
+
addq $0x20, %rax
|
|
110
|
+
cmpq $0x400, %rax # imm = 0x400
|
|
111
|
+
jne Lmld_poly_use_hint_88_avx2_asm_loop
|
|
112
|
+
retq
|
|
113
|
+
.cfi_endproc
|
|
114
|
+
|
|
115
|
+
MLD_ASM_FN_SIZE(poly_use_hint_88_avx2_asm)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
#endif /* MLD_ARITH_BACKEND_X86_64_DEFAULT && !MLD_CONFIG_NO_VERIFY_API && \
|
|
119
|
+
!MLD_CONFIG_MULTILEVEL_NO_SHARED && \
|
|
120
|
+
(MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 44) \
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
#if defined(__ELF__)
|
|
124
|
+
.section .note.GNU-stack,"",%progbits
|
|
125
|
+
#endif
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) The mldsa-native project authors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/* References
|
|
7
|
+
* ==========
|
|
8
|
+
*
|
|
9
|
+
* - [REF_AVX2]
|
|
10
|
+
* CRYSTALS-Dilithium optimized AVX2 implementation
|
|
11
|
+
* Bai, Ducas, Kiltz, Lepoint, Lyubashevsky, Schwabe, Seiler, Stehlé
|
|
12
|
+
* https://github.com/pq-crystals/dilithium/tree/master/avx2
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* This file is derived from the public domain
|
|
17
|
+
* AVX2 Dilithium implementation @[REF_AVX2].
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/*yaml
|
|
22
|
+
Name: polyz_unpack_17_avx2_asm
|
|
23
|
+
Description: x86_64 AVX2 unpacking of 17-bit packed coefficients.
|
|
24
|
+
Unpack polynomial z with 18-bit packed coefficients (GAMMA1 = 2^17),
|
|
25
|
+
mapping packed [0, 2^18-1] to signed [-(2^17-1), 2^17] via GAMMA1 - x.
|
|
26
|
+
Signature: void mld_polyz_unpack_17_avx2_asm(int32_t *r, const uint8_t *a)
|
|
27
|
+
ABI:
|
|
28
|
+
Architecture: x86_64
|
|
29
|
+
CallingConvention: SysV
|
|
30
|
+
Features: [AVX2]
|
|
31
|
+
rdi:
|
|
32
|
+
type: buffer
|
|
33
|
+
size_bytes: 1024
|
|
34
|
+
permissions: write-only
|
|
35
|
+
c_parameter: int32_t *r
|
|
36
|
+
description: Output polynomial (256 x int32_t)
|
|
37
|
+
rsi:
|
|
38
|
+
type: buffer
|
|
39
|
+
size_bytes: 576
|
|
40
|
+
permissions: read-only
|
|
41
|
+
c_parameter: const uint8_t *a
|
|
42
|
+
description: Packed input bytes
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
#include "../../../common.h"
|
|
46
|
+
|
|
47
|
+
#if defined(MLD_ARITH_BACKEND_X86_64_DEFAULT) && \
|
|
48
|
+
(!defined(MLD_CONFIG_NO_SIGN_API) || \
|
|
49
|
+
!defined(MLD_CONFIG_NO_VERIFY_API)) && \
|
|
50
|
+
!defined(MLD_CONFIG_MULTILEVEL_NO_SHARED) && \
|
|
51
|
+
(defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || \
|
|
52
|
+
MLD_CONFIG_PARAMETER_SET == 44)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/*
|
|
56
|
+
* WARNING: This file is auto-derived from the mldsa-native source file
|
|
57
|
+
* dev/x86_64/src/mldsa_polyz_unpack_17_avx2_asm.S using scripts/simpasm. Do not modify it directly.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
.text
|
|
61
|
+
.balign 4
|
|
62
|
+
.global MLD_ASM_NAMESPACE(polyz_unpack_17_avx2_asm)
|
|
63
|
+
MLD_ASM_FN_SYMBOL(polyz_unpack_17_avx2_asm)
|
|
64
|
+
|
|
65
|
+
.cfi_startproc
|
|
66
|
+
movabsq $-0xfbfcfd00fdff00, %rax # imm = 0xFF040302FF020100
|
|
67
|
+
vmovq %rax, %xmm1
|
|
68
|
+
movabsq $-0xf7f8f900f9fafc, %rax # imm = 0xFF080706FF060504
|
|
69
|
+
vpinsrq $0x1, %rax, %xmm1, %xmm1
|
|
70
|
+
movabsq $-0xe4e5e600e6e7e9, %rax # imm = 0xFF1B1A19FF191817
|
|
71
|
+
vmovq %rax, %xmm5
|
|
72
|
+
movabsq $-0xe0e1e200e2e3e5, %rax # imm = 0xFF1F1E1DFF1D1C1B
|
|
73
|
+
vpinsrq $0x1, %rax, %xmm5, %xmm5
|
|
74
|
+
vinserti128 $0x1, %xmm5, %ymm1, %ymm1
|
|
75
|
+
movabsq $0x200000000, %rax # imm = 0x200000000
|
|
76
|
+
vmovq %rax, %xmm2
|
|
77
|
+
movabsq $0x600000004, %rax # imm = 0x600000004
|
|
78
|
+
vpinsrq $0x1, %rax, %xmm2, %xmm2
|
|
79
|
+
vinserti128 $0x1, %xmm2, %ymm2, %ymm2
|
|
80
|
+
movl $0x3ffff, %eax # imm = 0x3FFFF
|
|
81
|
+
vmovd %eax, %xmm3
|
|
82
|
+
vpbroadcastd %xmm3, %ymm3
|
|
83
|
+
movl $0x20000, %eax # imm = 0x20000
|
|
84
|
+
vmovd %eax, %xmm4
|
|
85
|
+
vpbroadcastd %xmm4, %ymm4
|
|
86
|
+
vmovdqu (%rsi), %xmm0
|
|
87
|
+
vmovdqu 0x2(%rsi), %xmm5
|
|
88
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
89
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
90
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
91
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
92
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
93
|
+
vmovdqa %ymm0, (%rdi)
|
|
94
|
+
vmovdqu 0x12(%rsi), %xmm0
|
|
95
|
+
vmovdqu 0x14(%rsi), %xmm5
|
|
96
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
97
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
98
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
99
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
100
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
101
|
+
vmovdqa %ymm0, 0x20(%rdi)
|
|
102
|
+
vmovdqu 0x24(%rsi), %xmm0
|
|
103
|
+
vmovdqu 0x26(%rsi), %xmm5
|
|
104
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
105
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
106
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
107
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
108
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
109
|
+
vmovdqa %ymm0, 0x40(%rdi)
|
|
110
|
+
vmovdqu 0x36(%rsi), %xmm0
|
|
111
|
+
vmovdqu 0x38(%rsi), %xmm5
|
|
112
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
113
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
114
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
115
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
116
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
117
|
+
vmovdqa %ymm0, 0x60(%rdi)
|
|
118
|
+
vmovdqu 0x48(%rsi), %xmm0
|
|
119
|
+
vmovdqu 0x4a(%rsi), %xmm5
|
|
120
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
121
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
122
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
123
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
124
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
125
|
+
vmovdqa %ymm0, 0x80(%rdi)
|
|
126
|
+
vmovdqu 0x5a(%rsi), %xmm0
|
|
127
|
+
vmovdqu 0x5c(%rsi), %xmm5
|
|
128
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
129
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
130
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
131
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
132
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
133
|
+
vmovdqa %ymm0, 0xa0(%rdi)
|
|
134
|
+
vmovdqu 0x6c(%rsi), %xmm0
|
|
135
|
+
vmovdqu 0x6e(%rsi), %xmm5
|
|
136
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
137
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
138
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
139
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
140
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
141
|
+
vmovdqa %ymm0, 0xc0(%rdi)
|
|
142
|
+
vmovdqu 0x7e(%rsi), %xmm0
|
|
143
|
+
vmovdqu 0x80(%rsi), %xmm5
|
|
144
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
145
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
146
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
147
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
148
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
149
|
+
vmovdqa %ymm0, 0xe0(%rdi)
|
|
150
|
+
vmovdqu 0x90(%rsi), %xmm0
|
|
151
|
+
vmovdqu 0x92(%rsi), %xmm5
|
|
152
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
153
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
154
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
155
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
156
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
157
|
+
vmovdqa %ymm0, 0x100(%rdi)
|
|
158
|
+
vmovdqu 0xa2(%rsi), %xmm0
|
|
159
|
+
vmovdqu 0xa4(%rsi), %xmm5
|
|
160
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
161
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
162
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
163
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
164
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
165
|
+
vmovdqa %ymm0, 0x120(%rdi)
|
|
166
|
+
vmovdqu 0xb4(%rsi), %xmm0
|
|
167
|
+
vmovdqu 0xb6(%rsi), %xmm5
|
|
168
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
169
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
170
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
171
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
172
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
173
|
+
vmovdqa %ymm0, 0x140(%rdi)
|
|
174
|
+
vmovdqu 0xc6(%rsi), %xmm0
|
|
175
|
+
vmovdqu 0xc8(%rsi), %xmm5
|
|
176
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
177
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
178
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
179
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
180
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
181
|
+
vmovdqa %ymm0, 0x160(%rdi)
|
|
182
|
+
vmovdqu 0xd8(%rsi), %xmm0
|
|
183
|
+
vmovdqu 0xda(%rsi), %xmm5
|
|
184
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
185
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
186
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
187
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
188
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
189
|
+
vmovdqa %ymm0, 0x180(%rdi)
|
|
190
|
+
vmovdqu 0xea(%rsi), %xmm0
|
|
191
|
+
vmovdqu 0xec(%rsi), %xmm5
|
|
192
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
193
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
194
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
195
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
196
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
197
|
+
vmovdqa %ymm0, 0x1a0(%rdi)
|
|
198
|
+
vmovdqu 0xfc(%rsi), %xmm0
|
|
199
|
+
vmovdqu 0xfe(%rsi), %xmm5
|
|
200
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
201
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
202
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
203
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
204
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
205
|
+
vmovdqa %ymm0, 0x1c0(%rdi)
|
|
206
|
+
vmovdqu 0x10e(%rsi), %xmm0
|
|
207
|
+
vmovdqu 0x110(%rsi), %xmm5
|
|
208
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
209
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
210
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
211
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
212
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
213
|
+
vmovdqa %ymm0, 0x1e0(%rdi)
|
|
214
|
+
vmovdqu 0x120(%rsi), %xmm0
|
|
215
|
+
vmovdqu 0x122(%rsi), %xmm5
|
|
216
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
217
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
218
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
219
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
220
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
221
|
+
vmovdqa %ymm0, 0x200(%rdi)
|
|
222
|
+
vmovdqu 0x132(%rsi), %xmm0
|
|
223
|
+
vmovdqu 0x134(%rsi), %xmm5
|
|
224
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
225
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
226
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
227
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
228
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
229
|
+
vmovdqa %ymm0, 0x220(%rdi)
|
|
230
|
+
vmovdqu 0x144(%rsi), %xmm0
|
|
231
|
+
vmovdqu 0x146(%rsi), %xmm5
|
|
232
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
233
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
234
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
235
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
236
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
237
|
+
vmovdqa %ymm0, 0x240(%rdi)
|
|
238
|
+
vmovdqu 0x156(%rsi), %xmm0
|
|
239
|
+
vmovdqu 0x158(%rsi), %xmm5
|
|
240
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
241
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
242
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
243
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
244
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
245
|
+
vmovdqa %ymm0, 0x260(%rdi)
|
|
246
|
+
vmovdqu 0x168(%rsi), %xmm0
|
|
247
|
+
vmovdqu 0x16a(%rsi), %xmm5
|
|
248
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
249
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
250
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
251
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
252
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
253
|
+
vmovdqa %ymm0, 0x280(%rdi)
|
|
254
|
+
vmovdqu 0x17a(%rsi), %xmm0
|
|
255
|
+
vmovdqu 0x17c(%rsi), %xmm5
|
|
256
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
257
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
258
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
259
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
260
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
261
|
+
vmovdqa %ymm0, 0x2a0(%rdi)
|
|
262
|
+
vmovdqu 0x18c(%rsi), %xmm0
|
|
263
|
+
vmovdqu 0x18e(%rsi), %xmm5
|
|
264
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
265
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
266
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
267
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
268
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
269
|
+
vmovdqa %ymm0, 0x2c0(%rdi)
|
|
270
|
+
vmovdqu 0x19e(%rsi), %xmm0
|
|
271
|
+
vmovdqu 0x1a0(%rsi), %xmm5
|
|
272
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
273
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
274
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
275
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
276
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
277
|
+
vmovdqa %ymm0, 0x2e0(%rdi)
|
|
278
|
+
vmovdqu 0x1b0(%rsi), %xmm0
|
|
279
|
+
vmovdqu 0x1b2(%rsi), %xmm5
|
|
280
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
281
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
282
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
283
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
284
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
285
|
+
vmovdqa %ymm0, 0x300(%rdi)
|
|
286
|
+
vmovdqu 0x1c2(%rsi), %xmm0
|
|
287
|
+
vmovdqu 0x1c4(%rsi), %xmm5
|
|
288
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
289
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
290
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
291
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
292
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
293
|
+
vmovdqa %ymm0, 0x320(%rdi)
|
|
294
|
+
vmovdqu 0x1d4(%rsi), %xmm0
|
|
295
|
+
vmovdqu 0x1d6(%rsi), %xmm5
|
|
296
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
297
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
298
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
299
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
300
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
301
|
+
vmovdqa %ymm0, 0x340(%rdi)
|
|
302
|
+
vmovdqu 0x1e6(%rsi), %xmm0
|
|
303
|
+
vmovdqu 0x1e8(%rsi), %xmm5
|
|
304
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
305
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
306
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
307
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
308
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
309
|
+
vmovdqa %ymm0, 0x360(%rdi)
|
|
310
|
+
vmovdqu 0x1f8(%rsi), %xmm0
|
|
311
|
+
vmovdqu 0x1fa(%rsi), %xmm5
|
|
312
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
313
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
314
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
315
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
316
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
317
|
+
vmovdqa %ymm0, 0x380(%rdi)
|
|
318
|
+
vmovdqu 0x20a(%rsi), %xmm0
|
|
319
|
+
vmovdqu 0x20c(%rsi), %xmm5
|
|
320
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
321
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
322
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
323
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
324
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
325
|
+
vmovdqa %ymm0, 0x3a0(%rdi)
|
|
326
|
+
vmovdqu 0x21c(%rsi), %xmm0
|
|
327
|
+
vmovdqu 0x21e(%rsi), %xmm5
|
|
328
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
329
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
330
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
331
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
332
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
333
|
+
vmovdqa %ymm0, 0x3c0(%rdi)
|
|
334
|
+
vmovdqu 0x22e(%rsi), %xmm0
|
|
335
|
+
vmovdqu 0x230(%rsi), %xmm5
|
|
336
|
+
vinserti128 $0x1, %xmm5, %ymm0, %ymm0
|
|
337
|
+
vpshufb %ymm1, %ymm0, %ymm0
|
|
338
|
+
vpsrlvd %ymm2, %ymm0, %ymm0
|
|
339
|
+
vpand %ymm3, %ymm0, %ymm0
|
|
340
|
+
vpsubd %ymm0, %ymm4, %ymm0
|
|
341
|
+
vmovdqa %ymm0, 0x3e0(%rdi)
|
|
342
|
+
retq
|
|
343
|
+
.cfi_endproc
|
|
344
|
+
|
|
345
|
+
MLD_ASM_FN_SIZE(polyz_unpack_17_avx2_asm)
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
#endif /* MLD_ARITH_BACKEND_X86_64_DEFAULT && (!MLD_CONFIG_NO_SIGN_API || \
|
|
349
|
+
!MLD_CONFIG_NO_VERIFY_API) && !MLD_CONFIG_MULTILEVEL_NO_SHARED && \
|
|
350
|
+
(MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLD_CONFIG_PARAMETER_SET == 44) \
|
|
351
|
+
*/
|
|
352
|
+
|
|
353
|
+
#if defined(__ELF__)
|
|
354
|
+
.section .note.GNU-stack,"",%progbits
|
|
355
|
+
#endif
|