Skip to content

Commit a4e4e31

Browse files
committed
Revert "ALWAYS_INLINE -> NOINLINE"
This reverts commit 4cd703d. Signed-off-by: Matthias J. Kannwischer <matthias@zerorisc.com>
1 parent 732adb5 commit a4e4e31

4 files changed

Lines changed: 2 additions & 20 deletions

File tree

mlkem/mlkem_native.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,6 @@
377377
#undef MLK_HAVE_INLINE_ASM
378378
#undef MLK_INLINE
379379
#undef MLK_MUST_CHECK_RETURN_VALUE
380-
#undef MLK_NOINLINE
381380
#undef MLK_RESTRICT
382381
#undef MLK_STATIC_TESTABLE
383382
#undef MLK_SYS_AARCH64

mlkem/mlkem_native_asm.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@
398398
#undef MLK_HAVE_INLINE_ASM
399399
#undef MLK_INLINE
400400
#undef MLK_MUST_CHECK_RETURN_VALUE
401-
#undef MLK_NOINLINE
402401
#undef MLK_RESTRICT
403402
#undef MLK_STATIC_TESTABLE
404403
#undef MLK_SYS_AARCH64

mlkem/src/indcpa.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ int mlk_indcpa_keypair_derand(uint8_t pk[MLKEM_INDCPA_PUBLICKEYBYTES],
415415
#if defined(MLK_CONFIG_ENABLE_MLKEM_BRAID)
416416
MLK_INTERNAL_API
417417
#else
418-
static MLK_NOINLINE
418+
static MLK_ALWAYS_INLINE
419419
#endif
420420
int mlk_indcpa_enc_u(uint8_t ct_u[MLKEM_POLYVECCOMPRESSEDBYTES_DU],
421421
mlk_polyvec *sp, mlk_poly *epp,
@@ -491,7 +491,7 @@ int mlk_indcpa_enc_u(uint8_t ct_u[MLKEM_POLYVECCOMPRESSEDBYTES_DU],
491491
#if defined(MLK_CONFIG_ENABLE_MLKEM_BRAID)
492492
MLK_INTERNAL_API
493493
#else
494-
static MLK_NOINLINE
494+
static MLK_ALWAYS_INLINE
495495
#endif
496496
int mlk_indcpa_enc_v(uint8_t ct_v[MLKEM_POLYCOMPRESSEDBYTES_DV],
497497
const mlk_polyvec *sp, const mlk_poly *epp,

mlkem/src/sys.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,22 +146,6 @@
146146
#endif
147147
#endif /* !MLK_ALWAYS_INLINE */
148148

149-
/*
150-
* MLK_NOINLINE: Prevent inlining.
151-
* - GCC/Clang: __attribute__((noinline))
152-
* - MSVC: __declspec(noinline)
153-
* - Other: (no annotation)
154-
*/
155-
#if !defined(MLK_NOINLINE)
156-
#if defined(_MSC_VER)
157-
#define MLK_NOINLINE __declspec(noinline)
158-
#elif defined(__GNUC__) || defined(__clang__)
159-
#define MLK_NOINLINE __attribute__((noinline))
160-
#else
161-
#define MLK_NOINLINE
162-
#endif
163-
#endif /* !MLK_NOINLINE */
164-
165149
#ifndef MLK_STATIC_TESTABLE
166150
#define MLK_STATIC_TESTABLE static
167151
#endif

0 commit comments

Comments
 (0)