diff --git a/3rdparty/softfloat3/build/MAME/platform.h b/3rdparty/softfloat3/build/MAME/platform.h index 4a2cb42f299..441fdc8d05a 100644 --- a/3rdparty/softfloat3/build/MAME/platform.h +++ b/3rdparty/softfloat3/build/MAME/platform.h @@ -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 +#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 +#define __builtin_clz __lzcnt +#define __builtin_clzll __lzcnt64 +#else #if defined(PTR64) #define SOFTFLOAT_INTRINSIC_INT128 1 #endif +#endif #include "opts-GCC.h" diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 94879049604..7c1cc4acf4c 100644 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -196,6 +196,12 @@ includedirs { 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 { } defines { "SOFTFLOAT_ROUND_ODD",