File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,13 @@ The file structure is designed to make this selection manually achievable for an
149
149
will expose the deprecated ` ZSTDMT ` API exposed by ` zstdmt_compress.h ` in
150
150
the shared library, which is now hidden by default.
151
151
152
+ - The build macro ` STATIC_BMI2 ` can be set to 1 to force usage of ` bmi2 ` instructions.
153
+ It is generally not necessary to set this build macro,
154
+ because ` STATIC_BMI2 ` will be automatically set to 1
155
+ on detecting the presence of the corresponding instruction set in the compilation target.
156
+ It's nonetheless available as an optional manual toggle for better control,
157
+ and can also be used to forcefully disable ` bmi2 ` instructions by setting it to 0.
158
+
152
159
- The build macro ` DYNAMIC_BMI2 ` can be set to 1 or 0 in order to generate binaries
153
160
which can detect at runtime the presence of BMI2 instructions, and use them only if present.
154
161
These instructions contribute to better performance, notably on the decoder side.
Original file line number Diff line number Diff line change 209
209
210
210
/* Like DYNAMIC_BMI2 but for compile time determination of BMI2 support */
211
211
#ifndef STATIC_BMI2
212
- # if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_I86))
212
+ # if defined(_MSC_VER)
213
213
# ifdef __AVX2__ /* MSVC does not have a BMI2 specific flag, but every CPU that supports AVX2 also supports BMI2 */
214
214
# define STATIC_BMI2 1
215
215
# endif
216
- # elif defined(__BMI2__) && defined(__x86_64__) && defined(__GNUC__)
216
+ # elif defined(__BMI2__)
217
217
# define STATIC_BMI2 1
218
218
# endif
219
219
#endif
You can’t perform that action at this time.
0 commit comments