Skip to content

Commit 5d79846

Browse files
authored
Merge pull request #921 from pq-code-package/autogen_comments
Autogen: Autogenerate comments for #else and #endif
2 parents c76d792 + 30183bd commit 5d79846

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+615
-323
lines changed

dev/aarch64_clean/meta.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ static MLK_INLINE int mlk_rej_uniform_native(int16_t *r, unsigned len,
9090
}
9191
#endif /* !__ASSEMBLER__ */
9292

93-
#endif /* MLK_DEV_AARCH64_CLEAN_META_H */
93+
#endif /* !MLK_DEV_AARCH64_CLEAN_META_H */

dev/aarch64_clean/src/aarch64_zetas.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,8 @@ MLK_ALIGN const int16_t mlk_aarch64_zetas_mulcache_twisted_native[] = {
167167
-11566, 11566,
168168
};
169169

170-
#else /* defined(MLK_ARITH_BACKEND_AARCH64) \
171-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
170+
#else /* MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED */
172171

173172
MLK_EMPTY_CU(aarch64_zetas)
174173

175-
176-
#endif /* defined(MLK_ARITH_BACKEND_AARCH64) \
177-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
174+
#endif /* !(MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/aarch64_clean/src/arith_native_aarch64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ void mlk_polyvec_basemul_acc_montgomery_cached_asm_k4(int16_t *r,
7474
const int16_t *b,
7575
const int16_t *b_cache);
7676

77-
#endif /* MLK_DEV_AARCH64_CLEAN_SRC_ARITH_NATIVE_AARCH64_H */
77+
#endif /* !MLK_DEV_AARCH64_CLEAN_SRC_ARITH_NATIVE_AARCH64_H */

dev/aarch64_clean/src/consts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ extern const int16_t mlk_zetas_mulcache_native[256];
1616
MLK_NAMESPACE(zetas_mulcache_twisted_native)
1717
extern const int16_t mlk_zetas_mulcache_twisted_native[256];
1818

19-
#endif /* MLK_DEV_AARCH64_CLEAN_SRC_CONSTS_H */
19+
#endif /* !MLK_DEV_AARCH64_CLEAN_SRC_CONSTS_H */

dev/aarch64_clean/src/rej_uniform_table.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,8 @@ MLK_ALIGN const uint8_t mlk_rej_uniform_table[] = {
279279
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 /* 255 */,
280280
};
281281

282-
#else /* defined(MLK_ARITH_BACKEND_AARCH64) \
283-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
282+
#else /* MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED */
284283

285284
MLK_EMPTY_CU(aarch64_rej_uniform_table)
286285

287-
#endif /* defined(MLK_ARITH_BACKEND_AARCH64) \
288-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
286+
#endif /* !(MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/aarch64_opt/meta.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,4 @@ static MLK_INLINE int mlk_rej_uniform_native(int16_t *r, unsigned len,
9292
}
9393
#endif /* !__ASSEMBLER__ */
9494

95-
#endif /* MLK_DEV_AARCH64_OPT_META_H */
95+
#endif /* !MLK_DEV_AARCH64_OPT_META_H */

dev/aarch64_opt/src/aarch64_zetas.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,8 @@ MLK_ALIGN const int16_t mlk_aarch64_zetas_mulcache_twisted_native[] = {
167167
-11566, 11566,
168168
};
169169

170-
#else /* defined(MLK_ARITH_BACKEND_AARCH64) \
171-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
170+
#else /* MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED */
172171

173172
MLK_EMPTY_CU(aarch64_zetas)
174173

175-
176-
#endif /* defined(MLK_ARITH_BACKEND_AARCH64) \
177-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
174+
#endif /* !(MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/aarch64_opt/src/arith_native_aarch64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ void mlk_polyvec_basemul_acc_montgomery_cached_asm_k4(int16_t *r,
7373
unsigned mlk_rej_uniform_asm(int16_t *r, const uint8_t *buf, unsigned buflen,
7474
const uint8_t *table);
7575

76-
#endif /* MLK_DEV_AARCH64_OPT_SRC_ARITH_NATIVE_AARCH64_H */
76+
#endif /* !MLK_DEV_AARCH64_OPT_SRC_ARITH_NATIVE_AARCH64_H */

dev/aarch64_opt/src/consts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ extern const int16_t mlk_zetas_mulcache_native[256];
1616
MLK_NAMESPACE(zetas_mulcache_twisted_native)
1717
extern const int16_t mlk_zetas_mulcache_twisted_native[256];
1818

19-
#endif /* MLK_DEV_AARCH64_OPT_SRC_CONSTS_H */
19+
#endif /* !MLK_DEV_AARCH64_OPT_SRC_CONSTS_H */

dev/aarch64_opt/src/rej_uniform_table.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,8 @@ MLK_ALIGN const uint8_t mlk_rej_uniform_table[] = {
279279
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 /* 255 */,
280280
};
281281

282-
#else /* defined(MLK_ARITH_BACKEND_AARCH64) \
283-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
282+
#else /* MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED */
284283

285284
MLK_EMPTY_CU(aarch64_rej_uniform_table)
286285

287-
#endif /* defined(MLK_ARITH_BACKEND_AARCH64) \
288-
&& !defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
286+
#endif /* !(MLK_ARITH_BACKEND_AARCH64 && !MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/fips202/aarch64/auto.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "x1_v84a.h"
2929
#elif !defined(MLK_SYS_AARCH64_SLOW_BARREL_SHIFTER)
3030
#include "x1_scalar.h"
31-
#endif /* !MLK_SYS_AARCH64_SLOW_BARREL_SHIFTER */
31+
#endif
3232

3333
/*
3434
* Keccak-f1600x2/x4
@@ -51,14 +51,14 @@
5151
*/
5252
#if defined(__APPLE__)
5353
#include "x2_v84a.h"
54-
#else /* __APPLE__ */
54+
#else
5555
#include "x4_v8a_v84a_scalar.h"
56-
#endif /* __APPLE__ */
56+
#endif
5757

5858
#else /* __ARM_FEATURE_SHA3 */
5959

6060
#include "x4_v8a_scalar.h"
6161

62-
#endif /* __ARM_FEATURE_SHA3 */
62+
#endif /* !__ARM_FEATURE_SHA3 */
6363

64-
#endif /* MLK_DEV_FIPS202_AARCH64_AUTO_H */
64+
#endif /* !MLK_DEV_FIPS202_AARCH64_AUTO_H */

dev/fips202/aarch64/src/fips202_native_aarch64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ void mlk_keccak_f1600_x4_scalar_v8a_v84a_hybrid_asm(uint64_t *state,
4141
MLK_NAMESPACE(keccakf1600_round_constants)
4242
extern const uint64_t mlk_keccakf1600_round_constants[];
4343

44-
#endif /* MLK_DEV_FIPS202_AARCH64_SRC_FIPS202_NATIVE_AARCH64_H */
44+
#endif /* !MLK_DEV_FIPS202_AARCH64_SRC_FIPS202_NATIVE_AARCH64_H */

dev/fips202/aarch64/src/keccakf1600_round_constants.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,16 @@ MLK_ALIGN const uint64_t mlk_keccakf1600_round_constants[] = {
2626
0x8000000000008080, 0x0000000080000001, 0x8000000080008008,
2727
};
2828

29-
#else /* (defined(MLK_FIPS202_AARCH64_NEED_X1_SCALAR) || \
30-
defined(MLK_FIPS202_AARCH64_NEED_X1_V84A) || \
31-
defined(MLK_FIPS202_AARCH64_NEED_X2_V84A) || \
32-
defined(MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID) || \
33-
defined(MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID)) && \
34-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
29+
#else /* (MLK_FIPS202_AARCH64_NEED_X1_SCALAR || \
30+
MLK_FIPS202_AARCH64_NEED_X1_V84A || MLK_FIPS202_AARCH64_NEED_X2_V84A \
31+
|| MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID || \
32+
MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID) && \
33+
!MLK_MULTILEVEL_BUILD_NO_SHARED */
3534

3635
MLK_EMPTY_CU(fips202_aarch64_round_constants)
3736

38-
#endif /* (defined(MLK_FIPS202_AARCH64_NEED_X1_SCALAR) || \
39-
defined(MLK_FIPS202_AARCH64_NEED_X1_V84A) || \
40-
defined(MLK_FIPS202_AARCH64_NEED_X2_V84A) || \
41-
defined(MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID) || \
42-
defined(MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID)) && \
43-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
37+
#endif /* !((MLK_FIPS202_AARCH64_NEED_X1_SCALAR || \
38+
MLK_FIPS202_AARCH64_NEED_X1_V84A || MLK_FIPS202_AARCH64_NEED_X2_V84A \
39+
|| MLK_FIPS202_AARCH64_NEED_X4_V8A_SCALAR_HYBRID || \
40+
MLK_FIPS202_AARCH64_NEED_X4_V8A_V84A_SCALAR_HYBRID) && \
41+
!MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/fips202/aarch64/x1_scalar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ static MLK_INLINE void mlk_keccak_f1600_x1_native(uint64_t *state)
1919
}
2020
#endif /* !__ASSEMBLER__ */
2121

22-
#endif /* MLK_DEV_FIPS202_AARCH64_X1_SCALAR_H */
22+
#endif /* !MLK_DEV_FIPS202_AARCH64_X1_SCALAR_H */

dev/fips202/aarch64/x1_v84a.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if !defined(__ARM_FEATURE_SHA3)
1010
#error This backend can only be used if SHA3 extensions are available.
11-
#endif /* __ARM_FEATURE_SHA3 */
11+
#endif
1212

1313
/* Part of backend API */
1414
#define MLK_USE_FIPS202_X1_NATIVE
@@ -23,4 +23,4 @@ static MLK_INLINE void mlk_keccak_f1600_x1_native(uint64_t *state)
2323
}
2424
#endif /* !__ASSEMBLER__ */
2525

26-
#endif /* MLK_DEV_FIPS202_AARCH64_X1_V84A_H */
26+
#endif /* !MLK_DEV_FIPS202_AARCH64_X1_V84A_H */

dev/fips202/aarch64/x2_v84a.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if !defined(__ARM_FEATURE_SHA3)
1010
#error This backend can only be used if SHA3 extensions are available.
11-
#endif /* __ARM_FEATURE_SHA3 */
11+
#endif
1212

1313
/* Part of backend API */
1414
#define MLK_USE_FIPS202_X2_NATIVE
@@ -23,4 +23,4 @@ static MLK_INLINE void mlk_keccak_f1600_x2_native(uint64_t *state)
2323
}
2424
#endif /* !__ASSEMBLER__ */
2525

26-
#endif /* MLK_DEV_FIPS202_AARCH64_X2_V84A_H */
26+
#endif /* !MLK_DEV_FIPS202_AARCH64_X2_V84A_H */

dev/fips202/aarch64/x4_v8a_scalar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ static MLK_INLINE void mlk_keccak_f1600_x4_native(uint64_t *state)
2020
}
2121
#endif /* !__ASSEMBLER__ */
2222

23-
#endif /* MLK_DEV_FIPS202_AARCH64_X4_V8A_SCALAR_H */
23+
#endif /* !MLK_DEV_FIPS202_AARCH64_X4_V8A_SCALAR_H */

dev/fips202/aarch64/x4_v8a_v84a_scalar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#if !defined(__ARM_FEATURE_SHA3)
1010
#error This backend can only be used if SHA3 extensions are available.
11-
#endif /* __ARM_FEATURE_SHA3 */
11+
#endif
1212

1313
/* Part of backend API */
1414
#define MLK_USE_FIPS202_X4_NATIVE
@@ -24,4 +24,4 @@ static MLK_INLINE void mlk_keccak_f1600_x4_native(uint64_t *state)
2424
}
2525
#endif /* !__ASSEMBLER__ */
2626

27-
#endif /* MLK_DEV_FIPS202_AARCH64_X4_V8A_V84A_SCALAR_H */
27+
#endif /* !MLK_DEV_FIPS202_AARCH64_X4_V8A_V84A_SCALAR_H */

dev/x86_64/meta.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ static MLK_INLINE void mlk_poly_decompress_d10_native(
143143
{
144144
mlk_poly_decompress_d10_avx2((__m256i *)r, a);
145145
}
146-
#endif /* defined(MLK_MULTILEVEL_BUILD_WITH_SHARED) || (MLKEM_K == 2 \
147-
|| MLKEM_K == 3) */
146+
#endif /* MLK_MULTILEVEL_BUILD_WITH_SHARED || MLKEM_K == 2 || MLKEM_K == 3 */
148147

149148
#if defined(MLK_MULTILEVEL_BUILD_WITH_SHARED) || MLKEM_K == 4
150149
static MLK_INLINE void mlk_poly_compress_d5_native(
@@ -174,4 +173,4 @@ static MLK_INLINE void mlk_poly_decompress_d11_native(
174173

175174
#endif /* !__ASSEMBLER__ */
176175

177-
#endif /* MLK_DEV_X86_64_META_H */
176+
#endif /* !MLK_DEV_X86_64_META_H */

dev/x86_64/src/align.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
__m256i vec[(N + 15) / 16]; \
2121
}
2222

23-
#endif /* MLK_DEV_X86_64_SRC_ALIGN_H */
23+
#endif /* !MLK_DEV_X86_64_SRC_ALIGN_H */

dev/x86_64/src/arith_native_x86_64.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ void mlk_poly_compress_d11_avx2(uint8_t r[MLKEM_POLYCOMPRESSEDBYTES_D11],
8383
void mlk_poly_decompress_d11_avx2(
8484
__m256i *MLK_RESTRICT r, const uint8_t a[MLKEM_POLYCOMPRESSEDBYTES_D11]);
8585

86-
#endif /* MLK_DEV_X86_64_SRC_ARITH_NATIVE_X86_64_H */
86+
#endif /* !MLK_DEV_X86_64_SRC_ARITH_NATIVE_X86_64_H */

dev/x86_64/src/basemul.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ void mlk_polyvec_basemul_acc_montgomery_cached_avx2(unsigned k,
6666
mlk_zeroize(t, sizeof(t));
6767
}
6868

69-
#else /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
70-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
69+
#else /* MLK_ARITH_BACKEND_X86_64_DEFAULT && !MLK_MULTILEVEL_BUILD_NO_SHARED \
70+
*/
7171

7272
MLK_EMPTY_CU(avx2_basemul)
7373

74-
#endif /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
75-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
74+
#endif /* !(MLK_ARITH_BACKEND_X86_64_DEFAULT && \
75+
!MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/x86_64/src/compress_avx2.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ void mlk_poly_decompress_d10_avx2(
167167
_mm256_store_si256(&r[i], f);
168168
}
169169

170-
#endif /* defined(MLK_MULTILEVEL_BUILD_WITH_SHARED) || (MLKEM_K == 2 \
171-
|| MLKEM_K == 3) */
170+
#endif /* MLK_MULTILEVEL_BUILD_WITH_SHARED || MLKEM_K == 2 || MLKEM_K == 3 */
172171

173172
#if defined(MLK_MULTILEVEL_BUILD_WITH_SHARED) || MLKEM_K == 4
174173
void mlk_poly_compress_d5_avx2(uint8_t r[MLKEM_POLYCOMPRESSEDBYTES_D5],
@@ -366,12 +365,12 @@ void mlk_poly_decompress_d11_avx2(
366365
_mm256_store_si256(&r[i], f);
367366
}
368367

369-
#endif /* MLK_MULTILEVEL_BUILD || MLKEM_K == 4 */
368+
#endif /* MLK_MULTILEVEL_BUILD_WITH_SHARED || MLKEM_K == 4 */
370369

371-
#else /* MLK_ARITH_BACKEND_X86_64_DEFAULT && \
372-
! MLK_MULTILEVEL_BUILD_NO_SHARED */
370+
#else /* MLK_ARITH_BACKEND_X86_64_DEFAULT && !MLK_MULTILEVEL_BUILD_NO_SHARED \
371+
*/
373372

374373
MLK_EMPTY_CU(avx2_poly_compress)
375374

376-
#endif /* MLK_ARITH_BACKEND_X86_64_DEFAULT && \
377-
! MLK_MULTILEVEL_BUILD_NO_SHARED */
375+
#endif /* !(MLK_ARITH_BACKEND_X86_64_DEFAULT && \
376+
!MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/x86_64/src/consts.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ const qdata_t mlk_qdata = {{
100100
MLK_AVX2_SHIFT, MLK_AVX2_SHIFT, MLK_AVX2_SHIFT, MLK_AVX2_SHIFT,
101101
MLK_AVX2_SHIFT, MLK_AVX2_SHIFT, MLK_AVX2_SHIFT, MLK_AVX2_SHIFT}};
102102

103-
#else /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
104-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
103+
#else /* MLK_ARITH_BACKEND_X86_64_DEFAULT && !MLK_MULTILEVEL_BUILD_NO_SHARED \
104+
*/
105105

106106
MLK_EMPTY_CU(avx2_consts)
107107

108-
#endif /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
109-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
108+
#endif /* !(MLK_ARITH_BACKEND_X86_64_DEFAULT && \
109+
!MLK_MULTILEVEL_BUILD_NO_SHARED) */
110110

111111
/* To facilitate single-compilation-unit (SCU) builds, undefine all macros.
112112
* Don't modify by hand -- this is auto-generated by scripts/autogen. */

dev/x86_64/src/consts.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
typedef MLK_ALIGNED_INT16(640) qdata_t;
3838
#define mlk_qdata MLK_NAMESPACE(qdata)
3939
extern const qdata_t mlk_qdata;
40-
#endif
40+
#endif /* !__ASSEMBLER__ */
4141

42-
#endif /* MLK_DEV_X86_64_SRC_CONSTS_H */
42+
#endif /* !MLK_DEV_X86_64_SRC_CONSTS_H */

dev/x86_64/src/rej_uniform_avx2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ unsigned mlk_rej_uniform_avx2(int16_t *MLK_RESTRICT r, const uint8_t *buf)
126126
return ctr;
127127
}
128128

129-
#else /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
130-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
129+
#else /* MLK_ARITH_BACKEND_X86_64_DEFAULT && !MLK_MULTILEVEL_BUILD_NO_SHARED \
130+
*/
131131

132132
MLK_EMPTY_CU(avx2_rej_uniform)
133133

134-
#endif /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
135-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
134+
#endif /* !(MLK_ARITH_BACKEND_X86_64_DEFAULT && \
135+
!MLK_MULTILEVEL_BUILD_NO_SHARED) */

dev/x86_64/src/rej_uniform_table.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ MLK_ALIGN const uint8_t mlk_rej_uniform_table[256][8] = {
151151
{2, 4, 6, 8, 10, 12, 14, -1}, {0, 2, 4, 6, 8, 10, 12, 14},
152152
};
153153

154-
#else /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
155-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
154+
#else /* MLK_ARITH_BACKEND_X86_64_DEFAULT && !MLK_MULTILEVEL_BUILD_NO_SHARED \
155+
*/
156156

157157
MLK_EMPTY_CU(avx2_rej_uniform_table)
158158

159-
#endif /* defined(MLK_ARITH_BACKEND_X86_64_DEFAULT) && \
160-
!defined(MLK_MULTILEVEL_BUILD_NO_SHARED) */
159+
#endif /* !(MLK_ARITH_BACKEND_X86_64_DEFAULT && \
160+
!MLK_MULTILEVEL_BUILD_NO_SHARED) */

examples/monolithic_build/mlkem_native_monobuild.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
#include "mlkem/fips202/fips202.c"
3838
#include "mlkem/fips202/fips202x4.c"
3939
#include "mlkem/fips202/keccakf1600.c"
40-
#endif /* !MLK_MONOBUILD_CUSTOM_FIPS202 */
40+
#endif
4141

4242
#if defined(MLK_MONOBUILD_WITH_NATIVE_ARITH)
4343
#if defined(MLK_SYS_AARCH64)
4444
#include "mlkem/native/aarch64/src/aarch64_zetas.c"
4545
#include "mlkem/native/aarch64/src/rej_uniform_table.c"
46-
#endif /* MLK_SYS_AARCH64 */
46+
#endif
4747
#if defined(MLK_SYS_X86_64)
4848
#include "mlkem/native/x86_64/src/basemul.c"
4949
#include "mlkem/native/x86_64/src/compress_avx2.c"
@@ -56,10 +56,10 @@
5656
#if defined(MLK_MONOBUILD_WITH_NATIVE_FIPS202)
5757
#if defined(MLK_SYS_AARCH64)
5858
#include "mlkem/fips202/native/aarch64/src/keccakf1600_round_constants.c"
59-
#endif /* MLK_SYS_AARCH64 */
59+
#endif
6060
#if defined(MLK_SYS_X86_64)
6161
#include "mlkem/fips202/native/x86_64/src/KeccakP_1600_times4_SIMD256.c"
62-
#endif /* MLK_SYS_X86_64 */
62+
#endif
6363
#endif /* MLK_MONOBUILD_WITH_NATIVE_FIPS202 */
6464

6565
/*
@@ -486,4 +486,4 @@
486486
#undef MLK_NATIVE_X86_64_SRC_CONSTS_H
487487
#undef mlk_qdata
488488
#endif /* MLK_MONOBUILD_WITH_NATIVE_ARITH */
489-
#endif /* MLK_MONOBUILD_KEEP_SHARED_HEADERS */
489+
#endif /* !MLK_MONOBUILD_KEEP_SHARED_HEADERS */

integration/liboqs/config_aarch64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static MLK_INLINE void mlk_randombytes(uint8_t *ptr, size_t len)
176176
{
177177
OQS_randombytes(ptr, len);
178178
}
179-
#endif
179+
#endif /* !__ASSEMBLER__ */
180180

181181
/******************************************************************************
182182
* Name: MLK_NO_ASM
@@ -248,4 +248,4 @@ static MLK_INLINE void mlk_randombytes(uint8_t *ptr, size_t len)
248248
#endif
249249
#endif /* !__ASSEMBLER__ */
250250

251-
#endif /* MLK_INTEGRATION_LIBOQS_CONFIG_AARCH64_H */
251+
#endif /* !MLK_INTEGRATION_LIBOQS_CONFIG_AARCH64_H */

0 commit comments

Comments
 (0)