Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType
Commits:
-
188c7d66
by Alexei Podtelezhnikov at 2021-11-09T22:47:26-05:00
1 changed file:
Changes:
... | ... | @@ -372,9 +372,23 @@ FT_BEGIN_HEADER |
372 | 372 |
|
373 | 373 |
#endif
|
374 | 374 |
|
375 |
-#elif defined( _MSC_VER ) && ( _MSC_VER >= 1400 )
|
|
375 |
+#elif defined( _MSC_VER ) && _MSC_VER >= 1400
|
|
376 | 376 |
|
377 |
-#if FT_SIZEOF_INT == 4
|
|
377 |
+#if defined( _WIN32_WCE )
|
|
378 |
+ |
|
379 |
+#include <cmnintrin.h>
|
|
380 |
+#pragma intrinsic( _CountLeadingZeros )
|
|
381 |
+ |
|
382 |
+#define FT_MSB( x ) ( 31 - _CountLeadingZeros( x ) )
|
|
383 |
+ |
|
384 |
+#elif defined( _M_ARM64 ) || defined( _M_ARM )
|
|
385 |
+ |
|
386 |
+#include <intrin.h>
|
|
387 |
+#pragma intrinsic( _CountLeadingZeros )
|
|
388 |
+ |
|
389 |
+#define FT_MSB( x ) ( 31 - _CountLeadingZeros( x ) )
|
|
390 |
+ |
|
391 |
+#elif defined( _M_IX86 ) || defined( _M_AMD64 ) || defined( _M_IA64 )
|
|
378 | 392 |
|
379 | 393 |
#include <intrin.h>
|
380 | 394 |
#pragma intrinsic( _BitScanReverse )
|
... | ... | @@ -390,7 +404,7 @@ FT_BEGIN_HEADER |
390 | 404 |
return (FT_Int32)where;
|
391 | 405 |
}
|
392 | 406 |
|
393 |
-#define FT_MSB( x ) ( FT_MSB_i386( x ) )
|
|
407 |
+#define FT_MSB( x ) FT_MSB_i386( x )
|
|
394 | 408 |
|
395 | 409 |
#endif
|
396 | 410 |
|