mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +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.
|
#if defined(_MSC_VER)
|
||||||
#define SOFTFLOAT_BUILTIN_CLZ 1
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define _INC_MALLOC 0
|
#define _INC_MALLOC 0
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
|
|
||||||
// MSVC has __lzcnt16 as well, but opts-GCC.h expects __lzcnt for uint16_t and uint32_t
|
// 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
|
#define __builtin_clz __lzcnt
|
||||||
|
#endif // defined(_M_IX86) || defined(_M_AMD64)
|
||||||
|
#if defined(_M_AMD64)
|
||||||
|
#define SOFTFLOAT_BUILTIN_CLZ 1
|
||||||
#define __builtin_clzll __lzcnt64
|
#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)
|
#if defined(PTR64)
|
||||||
#define SOFTFLOAT_INTRINSIC_INT128 1
|
#define SOFTFLOAT_INTRINSIC_INT128 1
|
||||||
#endif
|
#endif // defined(PTR64)
|
||||||
#endif
|
|
||||||
|
#endif // defined(_MSC_VER)
|
||||||
|
|
||||||
#include "opts-GCC.h"
|
#include "opts-GCC.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user