mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
Fix softfloat3 build with MSVC 32-bit. Apparenly it's all-or-nothing with built-in leading zero count. (nw)
This commit is contained in:
parent
c372746c61
commit
a1ecd03c9d
21
3rdparty/softfloat3/build/MAME/platform.h
vendored
21
3rdparty/softfloat3/build/MAME/platform.h
vendored
@ -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)
|
||||
|
||||
#endif // defined(_MSC_VER)
|
||||
|
||||
#include "opts-GCC.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user