Skip to content

Commit

Permalink
enable DYNAMIC_BMI2 by default on x86 (32-bit mode)
Browse files Browse the repository at this point in the history
so far was only enabled for x64 (64-bit mode)
  • Loading branch information
Cyan4973 committed Jan 19, 2025
1 parent 9fbed33 commit 4bbf4a2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/common/portability_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@
* Enabled for clang & gcc >=4.8 on x86 when BMI2 isn't enabled by default.
*/
#ifndef DYNAMIC_BMI2
#if ((defined(__clang__) && __has_attribute(__target__)) \
# if ((defined(__clang__) && __has_attribute(__target__)) \
|| (defined(__GNUC__) \
&& (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))) \
&& (defined(__x86_64__) || defined(_M_X64)) \
&& (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64)) \
&& !defined(__BMI2__)
# define DYNAMIC_BMI2 1
#else
# define DYNAMIC_BMI2 0
#endif
# define DYNAMIC_BMI2 1
# else
# define DYNAMIC_BMI2 0
# endif
#endif

/**
Expand Down

0 comments on commit 4bbf4a2

Please sign in to comment.