diff options
author | 2018-05-14 20:18:24 +0700 | |
---|---|---|
committer | 2018-05-14 09:18:24 -0400 | |
commit | 4f9ef3e373cde3783aa73d3afd39422f735b1402 (patch) | |
tree | 8ad184395038d29da89c2a35f7e863e0f62b7f0b /3rdparty/softfloat3 | |
parent | fde607a7594b012ed03870362b079e0d999b28fa (diff) |
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)
Diffstat (limited to '3rdparty/softfloat3')
-rw-r--r-- | 3rdparty/softfloat3/build/MAME/platform.h | 11 |
1 files changed, 10 insertions, 1 deletions
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 <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) #define SOFTFLOAT_INTRINSIC_INT128 1 #endif +#endif #include "opts-GCC.h" |