softfloat3: fix msvc build (nw) (#3566)

* softfloat3: fix msvc build (nw)

Is this how we do these things? I assume we don't touch the library code itself, and have to "fix" any problems via this header instead?

* softfloat3: do we like this better? (nw)

* softfloat3: it gets the hose again (nw)

* softfloat3: sonofa (nw)
This commit is contained in:
Patrick Mackinlay 2018-05-14 20:18:24 +07:00 committed by R. Belmont
parent fde607a759
commit 4f9ef3e373
2 changed files with 16 additions and 1 deletions

View File

@ -54,12 +54,21 @@ Softfloat 3 MAME modifications
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
// may not be true for MSVC? true for GCC and Clang on Intel and ARM at least. // true for GCC and Clang on Intel and ARM, and MSVC on Intel.
#define SOFTFLOAT_BUILTIN_CLZ 1 #define SOFTFLOAT_BUILTIN_CLZ 1
#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
#define __builtin_clz __lzcnt
#define __builtin_clzll __lzcnt64
#else
#if defined(PTR64) #if defined(PTR64)
#define SOFTFLOAT_INTRINSIC_INT128 1 #define SOFTFLOAT_INTRINSIC_INT128 1
#endif #endif
#endif
#include "opts-GCC.h" #include "opts-GCC.h"

View File

@ -196,6 +196,12 @@ includedirs {
MAME_DIR .. "3rdparty/softfloat3/source/8086", MAME_DIR .. "3rdparty/softfloat3/source/8086",
} }
configuration { "vs*" }
buildoptions {
"/wd4701", -- warning C4701: potentially uninitialized local variable 'xxx' used
"/wd4703", -- warning C4703: potentially uninitialized local pointer variable 'xxx' used
}
configuration { } configuration { }
defines { defines {
"SOFTFLOAT_ROUND_ODD", "SOFTFLOAT_ROUND_ODD",