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.
Files changed (128) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +88 -0
  4. data/ext/mldsa_gh_native/extconf.rb +14 -0
  5. data/ext/mldsa_gh_native/mldsa_gh_native.c +222 -0
  6. data/ext/mldsa_gh_native/mldsa_gh_native_all.c +24 -0
  7. data/ext/mldsa_gh_native/mldsa_gh_native_all.h +26 -0
  8. data/ext/mldsa_gh_native/vendor/mldsa-native/BUILDING.md +108 -0
  9. data/ext/mldsa_gh_native/vendor/mldsa-native/LICENSE +305 -0
  10. data/ext/mldsa_gh_native/vendor/mldsa-native/README.md +247 -0
  11. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/README.md +23 -0
  12. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native.c +803 -0
  13. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native.h +956 -0
  14. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native_asm.S +830 -0
  15. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/mldsa_native_config.h +855 -0
  16. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/cbmc.h +233 -0
  17. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/common.h +301 -0
  18. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/context.h +152 -0
  19. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/ct.c +21 -0
  20. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/ct.h +373 -0
  21. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/debug.c +75 -0
  22. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/debug.h +125 -0
  23. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202.c +270 -0
  24. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202.h +224 -0
  25. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202x4.c +187 -0
  26. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/fips202x4.h +125 -0
  27. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.c +510 -0
  28. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/keccakf1600.h +110 -0
  29. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/auto.h +85 -0
  30. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/fips202_native_aarch64.h +69 -0
  31. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_scalar_aarch64_asm.S +378 -0
  32. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x1_v84a_aarch64_asm.S +207 -0
  33. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccak_f1600_x2_v84a_aarch64_asm.S +262 -0
  34. 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
  35. 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
  36. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/src/keccakf1600_round_constants.c +47 -0
  37. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_scalar.h +27 -0
  38. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x1_v84a.h +36 -0
  39. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x2_v84a.h +40 -0
  40. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_scalar.h +32 -0
  41. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/aarch64/x4_v8a_v84a_scalar.h +37 -0
  42. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/api.h +129 -0
  43. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/README.md +10 -0
  44. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/mve.h +67 -0
  45. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/fips202_native_armv81m.h +37 -0
  46. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.S +717 -0
  47. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_mve.c +42 -0
  48. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_extract_bytes_mve.S +334 -0
  49. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccak_f1600_x4_state_xor_bytes_mve.S +355 -0
  50. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/armv81m/src/keccakf1600_round_constants.c +53 -0
  51. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/auto.h +35 -0
  52. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/keccak_f1600_x4_avx2.h +34 -0
  53. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/fips202_native_x86_64.h +45 -0
  54. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccak_f1600_x4_avx2_asm.S +488 -0
  55. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/fips202/native/x86_64/src/keccakf1600_constants.c +52 -0
  56. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/meta.h +314 -0
  57. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/aarch64_zetas.c +248 -0
  58. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/arith_native_aarch64.h +367 -0
  59. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_intt_aarch64_asm.S +786 -0
  60. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_ntt_aarch64_asm.S +686 -0
  61. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_pointwise_montgomery_aarch64_asm.S +106 -0
  62. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_caddq_aarch64_asm.S +69 -0
  63. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_chknorm_aarch64_asm.S +76 -0
  64. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_32_aarch64_asm.S +108 -0
  65. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_decompose_88_aarch64_asm.S +108 -0
  66. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_32_aarch64_asm.S +125 -0
  67. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_poly_use_hint_88_aarch64_asm.S +133 -0
  68. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l4_aarch64_asm.S +157 -0
  69. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l5_aarch64_asm.S +173 -0
  70. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyvecl_pointwise_acc_montgomery_l7_aarch64_asm.S +205 -0
  71. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_17_aarch64_asm.S +103 -0
  72. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_polyz_unpack_19_aarch64_asm.S +100 -0
  73. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_aarch64_asm.S +222 -0
  74. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta2_aarch64_asm.S +170 -0
  75. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/mldsa_rej_uniform_eta4_aarch64_asm.S +163 -0
  76. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/polyz_unpack_table.c +52 -0
  77. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_eta_table.c +547 -0
  78. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/aarch64/src/rej_uniform_table.c +63 -0
  79. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/api.h +617 -0
  80. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/meta.h +24 -0
  81. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/meta.h +323 -0
  82. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/arith_native_x86_64.h +330 -0
  83. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.c +157 -0
  84. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/consts.h +27 -0
  85. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_intt_avx2_asm.S +2333 -0
  86. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_ntt_avx2_asm.S +2405 -0
  87. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_nttunpack_avx2_asm.S +254 -0
  88. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l4_avx2_asm.S +173 -0
  89. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l5_avx2_asm.S +189 -0
  90. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_acc_l7_avx2_asm.S +221 -0
  91. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_pointwise_avx2_asm.S +158 -0
  92. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_caddq_avx2_asm.S +199 -0
  93. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_chknorm_avx2_asm.S +176 -0
  94. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_32_avx2_asm.S +490 -0
  95. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_decompose_88_avx2_asm.S +489 -0
  96. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_32_avx2_asm.S +123 -0
  97. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_poly_use_hint_88_avx2_asm.S +125 -0
  98. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_17_avx2_asm.S +355 -0
  99. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_polyz_unpack_19_avx2_asm.S +355 -0
  100. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_avx2_asm.S +132 -0
  101. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta2_avx2_asm.S +205 -0
  102. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/mldsa_rej_uniform_eta4_avx2_asm.S +176 -0
  103. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/native/x86_64/src/rej_uniform_table.c +161 -0
  104. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/packing.c +213 -0
  105. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/packing.h +277 -0
  106. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/params.h +153 -0
  107. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly.c +1066 -0
  108. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly.h +464 -0
  109. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly_kl.c +910 -0
  110. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/poly_kl.h +367 -0
  111. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec.c +509 -0
  112. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec.h +435 -0
  113. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec_lazy.c +311 -0
  114. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/polyvec_lazy.h +652 -0
  115. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/randombytes.h +26 -0
  116. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/reduce.h +144 -0
  117. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/rounding.h +265 -0
  118. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sign.c +1720 -0
  119. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sign.h +850 -0
  120. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/symmetric.h +68 -0
  121. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/sys.h +327 -0
  122. data/ext/mldsa_gh_native/vendor/mldsa-native/mldsa/src/zetas.inc +55 -0
  123. data/lib/mldsa/parameter_set.rb +82 -0
  124. data/lib/mldsa/signing_key.rb +147 -0
  125. data/lib/mldsa/verify_key.rb +72 -0
  126. data/lib/mldsa/version.rb +7 -0
  127. data/lib/mldsa_gh.rb +93 -0
  128. metadata +225 -0
@@ -0,0 +1,221 @@
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
+ /*yaml
21
+ Name: pointwise_acc_l7_avx2_asm
22
+ Description: x86_64 AVX2 pointwise multiply-accumulate of length-7 polynomial vectors
23
+ Signature: void mld_pointwise_acc_l7_avx2_asm(int32_t *c, const int32_t a[7][256], const int32_t b[7][256], const int32_t *qdata)
24
+ ABI:
25
+ Architecture: x86_64
26
+ CallingConvention: SysV
27
+ Features: [AVX2]
28
+ rdi:
29
+ type: buffer
30
+ size_bytes: 1024
31
+ permissions: write-only
32
+ c_parameter: int32_t *c
33
+ description: Output polynomial (256 x int32_t)
34
+ rsi:
35
+ type: buffer
36
+ size_bytes: 7168
37
+ permissions: read-only
38
+ c_parameter: const int32_t a[7][256]
39
+ description: Input polynomial vector a (7 x 256 x int32_t)
40
+ rdx:
41
+ type: buffer
42
+ size_bytes: 7168
43
+ permissions: read-only
44
+ c_parameter: const int32_t b[7][256]
45
+ description: Input polynomial vector b (7 x 256 x int32_t)
46
+ rcx:
47
+ type: buffer
48
+ size_bytes: 2496
49
+ permissions: read-only
50
+ c_parameter: const int32_t *qdata
51
+ description: Precomputed constants (624 x int32_t)
52
+ */
53
+
54
+ #include "../../../common.h"
55
+ #if defined(MLD_ARITH_BACKEND_X86_64_DEFAULT) && \
56
+ !defined(MLD_CONFIG_MULTILEVEL_NO_SHARED) && \
57
+ (defined(MLD_CONFIG_MULTILEVEL_WITH_SHARED) || MLDSA_L == 7)
58
+
59
+ /*
60
+ * WARNING: This file is auto-derived from the mldsa-native source file
61
+ * dev/x86_64/src/mldsa_pointwise_acc_l7_avx2_asm.S using scripts/simpasm. Do not modify it directly.
62
+ */
63
+
64
+ .text
65
+ .balign 4
66
+ .global MLD_ASM_NAMESPACE(pointwise_acc_l7_avx2_asm)
67
+ MLD_ASM_FN_SYMBOL(pointwise_acc_l7_avx2_asm)
68
+
69
+ .cfi_startproc
70
+ vmovdqa 0x20(%rcx), %ymm0
71
+ vmovdqa (%rcx), %ymm1
72
+ xorl %eax, %eax
73
+
74
+ Lmld_pointwise_acc_l7_avx2_looptop2:
75
+ vmovdqa (%rsi), %ymm6
76
+ vmovdqa 0x20(%rsi), %ymm8
77
+ vmovdqa (%rdx), %ymm10
78
+ vmovdqa 0x20(%rdx), %ymm12
79
+ vpsrlq $0x20, %ymm6, %ymm7
80
+ vpsrlq $0x20, %ymm8, %ymm9
81
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
82
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
83
+ vpmuldq %ymm10, %ymm6, %ymm6
84
+ vpmuldq %ymm11, %ymm7, %ymm7
85
+ vpmuldq %ymm12, %ymm8, %ymm8
86
+ vpmuldq %ymm13, %ymm9, %ymm9
87
+ vmovdqa %ymm6, %ymm2
88
+ vmovdqa %ymm7, %ymm3
89
+ vmovdqa %ymm8, %ymm4
90
+ vmovdqa %ymm9, %ymm5
91
+ vmovdqa 0x400(%rsi), %ymm6
92
+ vmovdqa 0x420(%rsi), %ymm8
93
+ vmovdqa 0x400(%rdx), %ymm10
94
+ vmovdqa 0x420(%rdx), %ymm12
95
+ vpsrlq $0x20, %ymm6, %ymm7
96
+ vpsrlq $0x20, %ymm8, %ymm9
97
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
98
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
99
+ vpmuldq %ymm10, %ymm6, %ymm6
100
+ vpmuldq %ymm11, %ymm7, %ymm7
101
+ vpmuldq %ymm12, %ymm8, %ymm8
102
+ vpmuldq %ymm13, %ymm9, %ymm9
103
+ vpaddq %ymm2, %ymm6, %ymm2
104
+ vpaddq %ymm3, %ymm7, %ymm3
105
+ vpaddq %ymm4, %ymm8, %ymm4
106
+ vpaddq %ymm5, %ymm9, %ymm5
107
+ vmovdqa 0x800(%rsi), %ymm6
108
+ vmovdqa 0x820(%rsi), %ymm8
109
+ vmovdqa 0x800(%rdx), %ymm10
110
+ vmovdqa 0x820(%rdx), %ymm12
111
+ vpsrlq $0x20, %ymm6, %ymm7
112
+ vpsrlq $0x20, %ymm8, %ymm9
113
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
114
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
115
+ vpmuldq %ymm10, %ymm6, %ymm6
116
+ vpmuldq %ymm11, %ymm7, %ymm7
117
+ vpmuldq %ymm12, %ymm8, %ymm8
118
+ vpmuldq %ymm13, %ymm9, %ymm9
119
+ vpaddq %ymm2, %ymm6, %ymm2
120
+ vpaddq %ymm3, %ymm7, %ymm3
121
+ vpaddq %ymm4, %ymm8, %ymm4
122
+ vpaddq %ymm5, %ymm9, %ymm5
123
+ vmovdqa 0xc00(%rsi), %ymm6
124
+ vmovdqa 0xc20(%rsi), %ymm8
125
+ vmovdqa 0xc00(%rdx), %ymm10
126
+ vmovdqa 0xc20(%rdx), %ymm12
127
+ vpsrlq $0x20, %ymm6, %ymm7
128
+ vpsrlq $0x20, %ymm8, %ymm9
129
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
130
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
131
+ vpmuldq %ymm10, %ymm6, %ymm6
132
+ vpmuldq %ymm11, %ymm7, %ymm7
133
+ vpmuldq %ymm12, %ymm8, %ymm8
134
+ vpmuldq %ymm13, %ymm9, %ymm9
135
+ vpaddq %ymm2, %ymm6, %ymm2
136
+ vpaddq %ymm3, %ymm7, %ymm3
137
+ vpaddq %ymm4, %ymm8, %ymm4
138
+ vpaddq %ymm5, %ymm9, %ymm5
139
+ vmovdqa 0x1000(%rsi), %ymm6
140
+ vmovdqa 0x1020(%rsi), %ymm8
141
+ vmovdqa 0x1000(%rdx), %ymm10
142
+ vmovdqa 0x1020(%rdx), %ymm12
143
+ vpsrlq $0x20, %ymm6, %ymm7
144
+ vpsrlq $0x20, %ymm8, %ymm9
145
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
146
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
147
+ vpmuldq %ymm10, %ymm6, %ymm6
148
+ vpmuldq %ymm11, %ymm7, %ymm7
149
+ vpmuldq %ymm12, %ymm8, %ymm8
150
+ vpmuldq %ymm13, %ymm9, %ymm9
151
+ vpaddq %ymm2, %ymm6, %ymm2
152
+ vpaddq %ymm3, %ymm7, %ymm3
153
+ vpaddq %ymm4, %ymm8, %ymm4
154
+ vpaddq %ymm5, %ymm9, %ymm5
155
+ vmovdqa 0x1400(%rsi), %ymm6
156
+ vmovdqa 0x1420(%rsi), %ymm8
157
+ vmovdqa 0x1400(%rdx), %ymm10
158
+ vmovdqa 0x1420(%rdx), %ymm12
159
+ vpsrlq $0x20, %ymm6, %ymm7
160
+ vpsrlq $0x20, %ymm8, %ymm9
161
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
162
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
163
+ vpmuldq %ymm10, %ymm6, %ymm6
164
+ vpmuldq %ymm11, %ymm7, %ymm7
165
+ vpmuldq %ymm12, %ymm8, %ymm8
166
+ vpmuldq %ymm13, %ymm9, %ymm9
167
+ vpaddq %ymm2, %ymm6, %ymm2
168
+ vpaddq %ymm3, %ymm7, %ymm3
169
+ vpaddq %ymm4, %ymm8, %ymm4
170
+ vpaddq %ymm5, %ymm9, %ymm5
171
+ vmovdqa 0x1800(%rsi), %ymm6
172
+ vmovdqa 0x1820(%rsi), %ymm8
173
+ vmovdqa 0x1800(%rdx), %ymm10
174
+ vmovdqa 0x1820(%rdx), %ymm12
175
+ vpsrlq $0x20, %ymm6, %ymm7
176
+ vpsrlq $0x20, %ymm8, %ymm9
177
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
178
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
179
+ vpmuldq %ymm10, %ymm6, %ymm6
180
+ vpmuldq %ymm11, %ymm7, %ymm7
181
+ vpmuldq %ymm12, %ymm8, %ymm8
182
+ vpmuldq %ymm13, %ymm9, %ymm9
183
+ vpaddq %ymm2, %ymm6, %ymm2
184
+ vpaddq %ymm3, %ymm7, %ymm3
185
+ vpaddq %ymm4, %ymm8, %ymm4
186
+ vpaddq %ymm5, %ymm9, %ymm5
187
+ vpmuldq %ymm2, %ymm0, %ymm6
188
+ vpmuldq %ymm3, %ymm0, %ymm7
189
+ vpmuldq %ymm4, %ymm0, %ymm8
190
+ vpmuldq %ymm5, %ymm0, %ymm9
191
+ vpmuldq %ymm6, %ymm1, %ymm6
192
+ vpmuldq %ymm7, %ymm1, %ymm7
193
+ vpmuldq %ymm8, %ymm1, %ymm8
194
+ vpmuldq %ymm9, %ymm1, %ymm9
195
+ vpsubq %ymm6, %ymm2, %ymm2
196
+ vpsubq %ymm7, %ymm3, %ymm3
197
+ vpsubq %ymm8, %ymm4, %ymm4
198
+ vpsubq %ymm9, %ymm5, %ymm5
199
+ vpsrlq $0x20, %ymm2, %ymm2
200
+ vmovshdup %ymm4, %ymm4 # ymm4 = ymm4[1,1,3,3,5,5,7,7]
201
+ vpblendd $0xaa, %ymm3, %ymm2, %ymm2 # ymm2 = ymm2[0],ymm3[1],ymm2[2],ymm3[3],ymm2[4],ymm3[5],ymm2[6],ymm3[7]
202
+ vpblendd $0xaa, %ymm5, %ymm4, %ymm4 # ymm4 = ymm4[0],ymm5[1],ymm4[2],ymm5[3],ymm4[4],ymm5[5],ymm4[6],ymm5[7]
203
+ vmovdqa %ymm2, (%rdi)
204
+ vmovdqa %ymm4, 0x20(%rdi)
205
+ addq $0x40, %rsi
206
+ addq $0x40, %rdx
207
+ addq $0x40, %rdi
208
+ addl $0x1, %eax
209
+ cmpl $0x10, %eax
210
+ jb Lmld_pointwise_acc_l7_avx2_looptop2
211
+ retq
212
+ .cfi_endproc
213
+
214
+ MLD_ASM_FN_SIZE(pointwise_acc_l7_avx2_asm)
215
+
216
+ #endif /* MLD_ARITH_BACKEND_X86_64_DEFAULT && !MLD_CONFIG_MULTILEVEL_NO_SHARED \
217
+ && (MLD_CONFIG_MULTILEVEL_WITH_SHARED || MLDSA_L == 7) */
218
+
219
+ #if defined(__ELF__)
220
+ .section .note.GNU-stack,"",%progbits
221
+ #endif
@@ -0,0 +1,158 @@
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
+ /*yaml
21
+ Name: pointwise_avx2_asm
22
+ Description: x86_64 AVX2 pointwise Montgomery multiplication
23
+ Signature: void mld_pointwise_avx2_asm(int32_t *a, const int32_t *b, const int32_t *qdata)
24
+ ABI:
25
+ Architecture: x86_64
26
+ CallingConvention: SysV
27
+ Features: [AVX2]
28
+ rdi:
29
+ type: buffer
30
+ size_bytes: 1024
31
+ permissions: read/write
32
+ c_parameter: int32_t *a
33
+ description: Input/output polynomial (256 x int32_t)
34
+ rsi:
35
+ type: buffer
36
+ size_bytes: 1024
37
+ permissions: read-only
38
+ c_parameter: const int32_t *b
39
+ description: Input polynomial (256 x int32_t)
40
+ rdx:
41
+ type: buffer
42
+ size_bytes: 2496
43
+ permissions: read-only
44
+ c_parameter: const int32_t *qdata
45
+ description: Precomputed constants (624 x int32_t)
46
+ */
47
+
48
+ #include "../../../common.h"
49
+ #if defined(MLD_ARITH_BACKEND_X86_64_DEFAULT) && \
50
+ !defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
51
+
52
+ /*
53
+ * WARNING: This file is auto-derived from the mldsa-native source file
54
+ * dev/x86_64/src/mldsa_pointwise_avx2_asm.S using scripts/simpasm. Do not modify it directly.
55
+ */
56
+
57
+ .text
58
+ .balign 4
59
+ .global MLD_ASM_NAMESPACE(pointwise_avx2_asm)
60
+ MLD_ASM_FN_SYMBOL(pointwise_avx2_asm)
61
+
62
+ .cfi_startproc
63
+ vmovdqa 0x20(%rdx), %ymm0
64
+ vmovdqa (%rdx), %ymm1
65
+ xorl %eax, %eax
66
+
67
+ Lmld_pointwise_avx2_looptop1:
68
+ vmovdqa (%rdi), %ymm2
69
+ vmovdqa 0x20(%rdi), %ymm4
70
+ vmovdqa 0x40(%rdi), %ymm6
71
+ vmovdqa (%rsi), %ymm10
72
+ vmovdqa 0x20(%rsi), %ymm12
73
+ vmovdqa 0x40(%rsi), %ymm14
74
+ vpsrlq $0x20, %ymm2, %ymm3
75
+ vpsrlq $0x20, %ymm4, %ymm5
76
+ vmovshdup %ymm6, %ymm7 # ymm7 = ymm6[1,1,3,3,5,5,7,7]
77
+ vpsrlq $0x20, %ymm10, %ymm11
78
+ vpsrlq $0x20, %ymm12, %ymm13
79
+ vmovshdup %ymm14, %ymm15 # ymm15 = ymm14[1,1,3,3,5,5,7,7]
80
+ vpmuldq %ymm10, %ymm2, %ymm2
81
+ vpmuldq %ymm11, %ymm3, %ymm3
82
+ vpmuldq %ymm12, %ymm4, %ymm4
83
+ vpmuldq %ymm13, %ymm5, %ymm5
84
+ vpmuldq %ymm14, %ymm6, %ymm6
85
+ vpmuldq %ymm15, %ymm7, %ymm7
86
+ vpmuldq %ymm2, %ymm0, %ymm10
87
+ vpmuldq %ymm3, %ymm0, %ymm11
88
+ vpmuldq %ymm4, %ymm0, %ymm12
89
+ vpmuldq %ymm5, %ymm0, %ymm13
90
+ vpmuldq %ymm6, %ymm0, %ymm14
91
+ vpmuldq %ymm7, %ymm0, %ymm15
92
+ vpmuldq %ymm10, %ymm1, %ymm10
93
+ vpmuldq %ymm11, %ymm1, %ymm11
94
+ vpmuldq %ymm12, %ymm1, %ymm12
95
+ vpmuldq %ymm13, %ymm1, %ymm13
96
+ vpmuldq %ymm14, %ymm1, %ymm14
97
+ vpmuldq %ymm15, %ymm1, %ymm15
98
+ vpsubq %ymm10, %ymm2, %ymm2
99
+ vpsubq %ymm11, %ymm3, %ymm3
100
+ vpsubq %ymm12, %ymm4, %ymm4
101
+ vpsubq %ymm13, %ymm5, %ymm5
102
+ vpsubq %ymm14, %ymm6, %ymm6
103
+ vpsubq %ymm15, %ymm7, %ymm7
104
+ vpsrlq $0x20, %ymm2, %ymm2
105
+ vpsrlq $0x20, %ymm4, %ymm4
106
+ vmovshdup %ymm6, %ymm6 # ymm6 = ymm6[1,1,3,3,5,5,7,7]
107
+ vpblendd $0xaa, %ymm3, %ymm2, %ymm2 # ymm2 = ymm2[0],ymm3[1],ymm2[2],ymm3[3],ymm2[4],ymm3[5],ymm2[6],ymm3[7]
108
+ vpblendd $0xaa, %ymm5, %ymm4, %ymm4 # ymm4 = ymm4[0],ymm5[1],ymm4[2],ymm5[3],ymm4[4],ymm5[5],ymm4[6],ymm5[7]
109
+ vpblendd $0xaa, %ymm7, %ymm6, %ymm6 # ymm6 = ymm6[0],ymm7[1],ymm6[2],ymm7[3],ymm6[4],ymm7[5],ymm6[6],ymm7[7]
110
+ vmovdqa %ymm2, (%rdi)
111
+ vmovdqa %ymm4, 0x20(%rdi)
112
+ vmovdqa %ymm6, 0x40(%rdi)
113
+ addq $0x60, %rdi
114
+ addq $0x60, %rsi
115
+ addl $0x1, %eax
116
+ cmpl $0xa, %eax
117
+ jb Lmld_pointwise_avx2_looptop1
118
+ vmovdqa (%rdi), %ymm2
119
+ vmovdqa 0x20(%rdi), %ymm4
120
+ vmovdqa (%rsi), %ymm10
121
+ vmovdqa 0x20(%rsi), %ymm12
122
+ vpsrlq $0x20, %ymm2, %ymm3
123
+ vpsrlq $0x20, %ymm4, %ymm5
124
+ vmovshdup %ymm10, %ymm11 # ymm11 = ymm10[1,1,3,3,5,5,7,7]
125
+ vmovshdup %ymm12, %ymm13 # ymm13 = ymm12[1,1,3,3,5,5,7,7]
126
+ vpmuldq %ymm10, %ymm2, %ymm2
127
+ vpmuldq %ymm11, %ymm3, %ymm3
128
+ vpmuldq %ymm12, %ymm4, %ymm4
129
+ vpmuldq %ymm13, %ymm5, %ymm5
130
+ vpmuldq %ymm2, %ymm0, %ymm10
131
+ vpmuldq %ymm3, %ymm0, %ymm11
132
+ vpmuldq %ymm4, %ymm0, %ymm12
133
+ vpmuldq %ymm5, %ymm0, %ymm13
134
+ vpmuldq %ymm10, %ymm1, %ymm10
135
+ vpmuldq %ymm11, %ymm1, %ymm11
136
+ vpmuldq %ymm12, %ymm1, %ymm12
137
+ vpmuldq %ymm13, %ymm1, %ymm13
138
+ vpsubq %ymm10, %ymm2, %ymm2
139
+ vpsubq %ymm11, %ymm3, %ymm3
140
+ vpsubq %ymm12, %ymm4, %ymm4
141
+ vpsubq %ymm13, %ymm5, %ymm5
142
+ vpsrlq $0x20, %ymm2, %ymm2
143
+ vmovshdup %ymm4, %ymm4 # ymm4 = ymm4[1,1,3,3,5,5,7,7]
144
+ vpblendd $0x55, %ymm2, %ymm3, %ymm2 # ymm2 = ymm2[0],ymm3[1],ymm2[2],ymm3[3],ymm2[4],ymm3[5],ymm2[6],ymm3[7]
145
+ vpblendd $0x55, %ymm4, %ymm5, %ymm4 # ymm4 = ymm4[0],ymm5[1],ymm4[2],ymm5[3],ymm4[4],ymm5[5],ymm4[6],ymm5[7]
146
+ vmovdqa %ymm2, (%rdi)
147
+ vmovdqa %ymm4, 0x20(%rdi)
148
+ retq
149
+ .cfi_endproc
150
+
151
+ MLD_ASM_FN_SIZE(pointwise_avx2_asm)
152
+
153
+ #endif /* MLD_ARITH_BACKEND_X86_64_DEFAULT && !MLD_CONFIG_MULTILEVEL_NO_SHARED \
154
+ */
155
+
156
+ #if defined(__ELF__)
157
+ .section .note.GNU-stack,"",%progbits
158
+ #endif
@@ -0,0 +1,199 @@
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_caddq_avx2_asm
23
+ Description: x86_64 AVX2 conditional addition of q to each coefficient.
24
+ For all coefficients of the in/out polynomial, add Q if the coefficient
25
+ is negative.
26
+ Signature: void mld_poly_caddq_avx2_asm(int32_t *r)
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 *r
36
+ description: Input/output polynomial (256 x int32_t)
37
+ */
38
+
39
+ #include "../../../common.h"
40
+
41
+ #if defined(MLD_ARITH_BACKEND_X86_64_DEFAULT) && \
42
+ !defined(MLD_CONFIG_MULTILEVEL_NO_SHARED)
43
+
44
+
45
+ /*
46
+ * WARNING: This file is auto-derived from the mldsa-native source file
47
+ * dev/x86_64/src/mldsa_poly_caddq_avx2_asm.S using scripts/simpasm. Do not modify it directly.
48
+ */
49
+
50
+ .text
51
+ .balign 4
52
+ .global MLD_ASM_NAMESPACE(poly_caddq_avx2_asm)
53
+ MLD_ASM_FN_SYMBOL(poly_caddq_avx2_asm)
54
+
55
+ .cfi_startproc
56
+ vpxor %xmm2, %xmm2, %xmm2
57
+ movl $0x7fe001, %eax # imm = 0x7FE001
58
+ vmovd %eax, %xmm1
59
+ vpbroadcastd %xmm1, %ymm1
60
+ vpcmpgtd (%rdi), %ymm2, %ymm0
61
+ vpand %ymm1, %ymm0, %ymm0
62
+ vpaddd (%rdi), %ymm0, %ymm0
63
+ vmovdqa %ymm0, (%rdi)
64
+ vpcmpgtd 0x20(%rdi), %ymm2, %ymm3
65
+ vpand %ymm1, %ymm3, %ymm3
66
+ vpaddd 0x20(%rdi), %ymm3, %ymm3
67
+ vmovdqa %ymm3, 0x20(%rdi)
68
+ vpcmpgtd 0x40(%rdi), %ymm2, %ymm4
69
+ vpand %ymm1, %ymm4, %ymm4
70
+ vpaddd 0x40(%rdi), %ymm4, %ymm4
71
+ vmovdqa %ymm4, 0x40(%rdi)
72
+ vpcmpgtd 0x60(%rdi), %ymm2, %ymm5
73
+ vpand %ymm1, %ymm5, %ymm5
74
+ vpaddd 0x60(%rdi), %ymm5, %ymm5
75
+ vmovdqa %ymm5, 0x60(%rdi)
76
+ vpcmpgtd 0x80(%rdi), %ymm2, %ymm0
77
+ vpand %ymm1, %ymm0, %ymm0
78
+ vpaddd 0x80(%rdi), %ymm0, %ymm0
79
+ vmovdqa %ymm0, 0x80(%rdi)
80
+ vpcmpgtd 0xa0(%rdi), %ymm2, %ymm3
81
+ vpand %ymm1, %ymm3, %ymm3
82
+ vpaddd 0xa0(%rdi), %ymm3, %ymm3
83
+ vmovdqa %ymm3, 0xa0(%rdi)
84
+ vpcmpgtd 0xc0(%rdi), %ymm2, %ymm4
85
+ vpand %ymm1, %ymm4, %ymm4
86
+ vpaddd 0xc0(%rdi), %ymm4, %ymm4
87
+ vmovdqa %ymm4, 0xc0(%rdi)
88
+ vpcmpgtd 0xe0(%rdi), %ymm2, %ymm5
89
+ vpand %ymm1, %ymm5, %ymm5
90
+ vpaddd 0xe0(%rdi), %ymm5, %ymm5
91
+ vmovdqa %ymm5, 0xe0(%rdi)
92
+ vpcmpgtd 0x100(%rdi), %ymm2, %ymm0
93
+ vpand %ymm1, %ymm0, %ymm0
94
+ vpaddd 0x100(%rdi), %ymm0, %ymm0
95
+ vmovdqa %ymm0, 0x100(%rdi)
96
+ vpcmpgtd 0x120(%rdi), %ymm2, %ymm3
97
+ vpand %ymm1, %ymm3, %ymm3
98
+ vpaddd 0x120(%rdi), %ymm3, %ymm3
99
+ vmovdqa %ymm3, 0x120(%rdi)
100
+ vpcmpgtd 0x140(%rdi), %ymm2, %ymm4
101
+ vpand %ymm1, %ymm4, %ymm4
102
+ vpaddd 0x140(%rdi), %ymm4, %ymm4
103
+ vmovdqa %ymm4, 0x140(%rdi)
104
+ vpcmpgtd 0x160(%rdi), %ymm2, %ymm5
105
+ vpand %ymm1, %ymm5, %ymm5
106
+ vpaddd 0x160(%rdi), %ymm5, %ymm5
107
+ vmovdqa %ymm5, 0x160(%rdi)
108
+ vpcmpgtd 0x180(%rdi), %ymm2, %ymm0
109
+ vpand %ymm1, %ymm0, %ymm0
110
+ vpaddd 0x180(%rdi), %ymm0, %ymm0
111
+ vmovdqa %ymm0, 0x180(%rdi)
112
+ vpcmpgtd 0x1a0(%rdi), %ymm2, %ymm3
113
+ vpand %ymm1, %ymm3, %ymm3
114
+ vpaddd 0x1a0(%rdi), %ymm3, %ymm3
115
+ vmovdqa %ymm3, 0x1a0(%rdi)
116
+ vpcmpgtd 0x1c0(%rdi), %ymm2, %ymm4
117
+ vpand %ymm1, %ymm4, %ymm4
118
+ vpaddd 0x1c0(%rdi), %ymm4, %ymm4
119
+ vmovdqa %ymm4, 0x1c0(%rdi)
120
+ vpcmpgtd 0x1e0(%rdi), %ymm2, %ymm5
121
+ vpand %ymm1, %ymm5, %ymm5
122
+ vpaddd 0x1e0(%rdi), %ymm5, %ymm5
123
+ vmovdqa %ymm5, 0x1e0(%rdi)
124
+ vpcmpgtd 0x200(%rdi), %ymm2, %ymm0
125
+ vpand %ymm1, %ymm0, %ymm0
126
+ vpaddd 0x200(%rdi), %ymm0, %ymm0
127
+ vmovdqa %ymm0, 0x200(%rdi)
128
+ vpcmpgtd 0x220(%rdi), %ymm2, %ymm3
129
+ vpand %ymm1, %ymm3, %ymm3
130
+ vpaddd 0x220(%rdi), %ymm3, %ymm3
131
+ vmovdqa %ymm3, 0x220(%rdi)
132
+ vpcmpgtd 0x240(%rdi), %ymm2, %ymm4
133
+ vpand %ymm1, %ymm4, %ymm4
134
+ vpaddd 0x240(%rdi), %ymm4, %ymm4
135
+ vmovdqa %ymm4, 0x240(%rdi)
136
+ vpcmpgtd 0x260(%rdi), %ymm2, %ymm5
137
+ vpand %ymm1, %ymm5, %ymm5
138
+ vpaddd 0x260(%rdi), %ymm5, %ymm5
139
+ vmovdqa %ymm5, 0x260(%rdi)
140
+ vpcmpgtd 0x280(%rdi), %ymm2, %ymm0
141
+ vpand %ymm1, %ymm0, %ymm0
142
+ vpaddd 0x280(%rdi), %ymm0, %ymm0
143
+ vmovdqa %ymm0, 0x280(%rdi)
144
+ vpcmpgtd 0x2a0(%rdi), %ymm2, %ymm3
145
+ vpand %ymm1, %ymm3, %ymm3
146
+ vpaddd 0x2a0(%rdi), %ymm3, %ymm3
147
+ vmovdqa %ymm3, 0x2a0(%rdi)
148
+ vpcmpgtd 0x2c0(%rdi), %ymm2, %ymm4
149
+ vpand %ymm1, %ymm4, %ymm4
150
+ vpaddd 0x2c0(%rdi), %ymm4, %ymm4
151
+ vmovdqa %ymm4, 0x2c0(%rdi)
152
+ vpcmpgtd 0x2e0(%rdi), %ymm2, %ymm5
153
+ vpand %ymm1, %ymm5, %ymm5
154
+ vpaddd 0x2e0(%rdi), %ymm5, %ymm5
155
+ vmovdqa %ymm5, 0x2e0(%rdi)
156
+ vpcmpgtd 0x300(%rdi), %ymm2, %ymm0
157
+ vpand %ymm1, %ymm0, %ymm0
158
+ vpaddd 0x300(%rdi), %ymm0, %ymm0
159
+ vmovdqa %ymm0, 0x300(%rdi)
160
+ vpcmpgtd 0x320(%rdi), %ymm2, %ymm3
161
+ vpand %ymm1, %ymm3, %ymm3
162
+ vpaddd 0x320(%rdi), %ymm3, %ymm3
163
+ vmovdqa %ymm3, 0x320(%rdi)
164
+ vpcmpgtd 0x340(%rdi), %ymm2, %ymm4
165
+ vpand %ymm1, %ymm4, %ymm4
166
+ vpaddd 0x340(%rdi), %ymm4, %ymm4
167
+ vmovdqa %ymm4, 0x340(%rdi)
168
+ vpcmpgtd 0x360(%rdi), %ymm2, %ymm5
169
+ vpand %ymm1, %ymm5, %ymm5
170
+ vpaddd 0x360(%rdi), %ymm5, %ymm5
171
+ vmovdqa %ymm5, 0x360(%rdi)
172
+ vpcmpgtd 0x380(%rdi), %ymm2, %ymm0
173
+ vpand %ymm1, %ymm0, %ymm0
174
+ vpaddd 0x380(%rdi), %ymm0, %ymm0
175
+ vmovdqa %ymm0, 0x380(%rdi)
176
+ vpcmpgtd 0x3a0(%rdi), %ymm2, %ymm3
177
+ vpand %ymm1, %ymm3, %ymm3
178
+ vpaddd 0x3a0(%rdi), %ymm3, %ymm3
179
+ vmovdqa %ymm3, 0x3a0(%rdi)
180
+ vpcmpgtd 0x3c0(%rdi), %ymm2, %ymm4
181
+ vpand %ymm1, %ymm4, %ymm4
182
+ vpaddd 0x3c0(%rdi), %ymm4, %ymm4
183
+ vmovdqa %ymm4, 0x3c0(%rdi)
184
+ vpcmpgtd 0x3e0(%rdi), %ymm2, %ymm5
185
+ vpand %ymm1, %ymm5, %ymm5
186
+ vpaddd 0x3e0(%rdi), %ymm5, %ymm5
187
+ vmovdqa %ymm5, 0x3e0(%rdi)
188
+ retq
189
+ .cfi_endproc
190
+
191
+ MLD_ASM_FN_SIZE(poly_caddq_avx2_asm)
192
+
193
+
194
+ #endif /* MLD_ARITH_BACKEND_X86_64_DEFAULT && !MLD_CONFIG_MULTILEVEL_NO_SHARED \
195
+ */
196
+
197
+ #if defined(__ELF__)
198
+ .section .note.GNU-stack,"",%progbits
199
+ #endif