Do not re-define macros already provided by native compiler

pull/217/head
Mouse 2016-07-04 13:11:15 -04:00
parent be80fcdbba
commit e36270fa7c
1 changed files with 8 additions and 0 deletions

8
misc.h
View File

@ -63,10 +63,18 @@
#if defined(__GNUC__) && defined(__BMI__)
# include <immintrin.h>
# 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