File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 102102#define WOLFSSL_NO_HASH_RAW
103103#endif
104104
105- #if defined(_MSC_VER )
106- #define SHA256_NOINLINE __declspec(noinline)
107- #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__GNUC__ )
108- #define SHA256_NOINLINE __attribute__((noinline))
109- #else
110- #define SHA256_NOINLINE
111- #endif
105+ #define SHA256_NOINLINE WC_NO_INLINE
112106
113107#if !defined(NO_OLD_SHA_NAMES )
114108 #define SHA256 WC_SHA256
Original file line number Diff line number Diff line change 8080 #include <wolfssl/wolfcrypt/port/st/stm32.h>
8181#endif
8282
83- #if defined(_MSC_VER )
84- #define SHA512_NOINLINE __declspec(noinline)
85- #elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__GNUC__ )
86- #define SHA512_NOINLINE __attribute__((noinline))
87- #else
88- #define SHA512_NOINLINE
89- #endif
83+ #define SHA512_NOINLINE WC_NO_INLINE
9084
9185#ifdef WOLFSSL_SHA512
9286
Original file line number Diff line number Diff line change 4848 #undef WOLFSSL_HAVE_SP_ECC
4949#endif
5050
51- #ifdef noinline
52- #define SP_NOINLINE noinline
53- #elif defined(_MSC_VER )
54- #define SP_NOINLINE __declspec(noinline)
55- #elif defined(__ICCARM__ ) || defined(__IAR_SYSTEMS_ICC__ )
56- #define SP_NOINLINE _Pragma("inline = never")
57- #elif defined(__GNUC__ ) || defined(__KEIL__ ) || defined(__DCC__ )
58- #define SP_NOINLINE __attribute__((noinline))
59- #else
60- #define SP_NOINLINE
61- #endif
62-
51+ #define SP_NOINLINE WC_NO_INLINE
6352
6453#ifdef __cplusplus
6554 extern "C" {
Original file line number Diff line number Diff line change 4444 #define WOLFSSL_MLKEM_NO_DECAPSULATE
4545#endif
4646
47- #ifdef noinline
48- #define MLKEM_NOINLINE noinline
49- #elif defined(_MSC_VER )
50- #define MLKEM_NOINLINE __declspec(noinline)
51- #elif defined(__GNUC__ )
52- #define MLKEM_NOINLINE __attribute__((noinline))
53- #else
54- #define MLKEM_NOINLINE
55- #endif
47+ #define MLKEM_NOINLINE WC_NO_INLINE
5648
5749enum {
5850 /* Flags of Kyber keys. */
Original file line number Diff line number Diff line change 143143#endif
144144#endif
145145
146+ #ifndef WC_NO_INLINE
147+ #ifdef noinline
148+ #define WC_NO_INLINE noinline
149+ #elif defined(_MSC_VER )
150+ #define WC_NO_INLINE __declspec(noinline)
151+ #elif defined(__ICCARM__ ) || defined(__IAR_SYSTEMS_ICC__ )
152+ #define WC_NO_INLINE _Pragma("inline = never")
153+ #elif defined(__GNUC__ ) || defined(__KEIL__ ) || defined(__DCC__ )
154+ #define WC_NO_INLINE __attribute__((noinline))
155+ #else
156+ #define WC_NO_INLINE
157+ #endif
158+ #endif
159+
146160#ifndef WC_OMIT_FRAME_POINTER
147161 #if defined(__GNUC__ )
148162 #define WC_OMIT_FRAME_POINTER \
You can’t perform that action at this time.
0 commit comments