diff options
author | Vas Crabb <vas@vastheman.com> | 2018-05-27 22:08:35 +1000 |
---|---|---|
committer | Vas Crabb <vas@vastheman.com> | 2018-05-27 22:08:35 +1000 |
commit | a1ecd03c9d6e0e44c301618290629df08dc76ceb (patch) | |
tree | c3ece938399f43b3f7cb72e14b3eb0a51519be1d /3rdparty | |
parent | c372746c618fcfbd2d7684290a38af93eee2fd8a (diff) |
Fix softfloat3 build with MSVC 32-bit. Apparenly it's all-or-nothing with built-in leading zero count. (nw)
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/softfloat3/build/MAME/platform.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/3rdparty/softfloat3/build/MAME/platform.h b/3rdparty/softfloat3/build/MAME/platform.h index 441fdc8d05a..96fc81e348e 100644 --- a/3rdparty/softfloat3/build/MAME/platform.h +++ b/3rdparty/softfloat3/build/MAME/platform.h @@ -54,21 +54,28 @@ Softfloat 3 MAME modifications /*---------------------------------------------------------------------------- *----------------------------------------------------------------------------*/ -// true for GCC and Clang on Intel and ARM, and MSVC on Intel. -#define SOFTFLOAT_BUILTIN_CLZ 1 +#if defined(_MSC_VER) -#ifdef _MSC_VER #define _INC_MALLOC 0 #include <intrin.h> // MSVC has __lzcnt16 as well, but opts-GCC.h expects __lzcnt for uint16_t and uint32_t +#if defined(_M_IX86) || defined(_M_AMD64) #define __builtin_clz __lzcnt +#endif // defined(_M_IX86) || defined(_M_AMD64) +#if defined(_M_AMD64) +#define SOFTFLOAT_BUILTIN_CLZ 1 #define __builtin_clzll __lzcnt64 -#else +#endif // defined(_M_AMD64) + +#else // defined(_MSC_VER) + +// true for GCC and Clang on Intel and ARM, and MSVC on Intel. +#define SOFTFLOAT_BUILTIN_CLZ 1 #if defined(PTR64) #define SOFTFLOAT_INTRINSIC_INT128 1 -#endif -#endif +#endif // defined(PTR64) -#include "opts-GCC.h" +#endif // defined(_MSC_VER) +#include "opts-GCC.h" |