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 // 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) + +#endif // defined(_MSC_VER) #include "opts-GCC.h" -