Skip to content

Commit def5cf2

Browse files
committed
Allow disabling of CLZL and CTZL builtins.
Fixes: fe8e4bf ("Use more builtin functions if available") Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 40e43ea commit def5cf2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/headers/tomcrypt_cfg.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ typedef unsigned long ltc_mp_digit;
246246
#undef LTC_FAST
247247
#define LTC_NO_AES_NI
248248
#define LTC_NO_BSWAP
249+
#define LTC_NO_CLZL
250+
#define LTC_NO_CTZL
249251
#define LTC_NO_ROLC
250252
#define LTC_NO_ROTATE
251253
#endif
@@ -296,11 +298,11 @@ typedef unsigned long ltc_mp_digit;
296298
#define LTC_HAVE_ROTATE_BUILTIN
297299
#endif
298300

299-
#if __has_builtin(__builtin_clzl)
301+
#if !defined(LTC_NO_CLZL) && __has_builtin(__builtin_clzl)
300302
#define LTC_HAVE_CLZL_BUILTIN
301303
#endif
302304

303-
#if __has_builtin(__builtin_ctzl)
305+
#if !defined(LTC_NO_CTZL) && __has_builtin(__builtin_ctzl)
304306
#define LTC_HAVE_CTZL_BUILTIN
305307
#endif
306308

0 commit comments

Comments
 (0)