From a327717618207b1a7dd4b3753d2518e4c3203ded Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 21 Jul 2016 18:04:05 -0400 Subject: [PATCH] Guard _blsr_u64 and _tzcnt_u64 on __x86_64__ --- misc.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/misc.h b/misc.h index e86f9ac3..689b5ed3 100644 --- a/misc.h +++ b/misc.h @@ -63,20 +63,22 @@ #if defined(__GNUC__) && defined(__BMI__) # include # if defined(__clang__) -#ifndef _tzcnt_u32 -# define _tzcnt_u32(x) __tzcnt_u32(x) -#endif -#ifndef _tzcnt_u64 -# define _tzcnt_u64(x) __tzcnt_u64(x) -#endif -#ifndef _blsr_u32 -# define _blsr_u32(x) __blsr_u32(x) -#endif -#ifndef _blsr_u64 -# define _blsr_u64(x) __blsr_u64(x) -#endif -# endif -#endif +# ifndef _tzcnt_u32 +# define _tzcnt_u32(x) __tzcnt_u32(x) +# endif +# ifndef _blsr_u32 +# define _blsr_u32(x) __blsr_u32(x) +# endif +# ifdef __x86_64__ +# ifndef _tzcnt_u64 +# define _tzcnt_u64(x) __tzcnt_u64(x) +# endif +# ifndef _blsr_u64 +# define _blsr_u64(x) __blsr_u64(x) +# endif +# endif // x86_64 +# endif // Clang +#endif // GNUC and BMI #endif // CRYPTOPP_DOXYGEN_PROCESSING