diff options
| author | 2025-04-20 08:38:43 +1000 | |
|---|---|---|
| committer | 2025-04-20 08:38:43 +1000 | |
| commit | 91cc7c09922fb748e7a11210b0c4026aef733692 (patch) | |
| tree | e8663bf8b0fdecdd2dc611b09348b0b191484406 | |
| parent | cfec4a0ec012168c90833510968f20ef4e64e7ca (diff) | |
3rdparty/softfloat3: Proper way to detect presence of __int128 on GCC/clang.
| -rw-r--r-- | 3rdparty/softfloat3/build/MAME/platform.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/3rdparty/softfloat3/build/MAME/platform.h b/3rdparty/softfloat3/build/MAME/platform.h index 6fd29db58fd..f49392880ce 100644 --- a/3rdparty/softfloat3/build/MAME/platform.h +++ b/3rdparty/softfloat3/build/MAME/platform.h @@ -56,6 +56,7 @@ Softfloat 3 MAME modifications #include <intrin.h> // MSVC has __lzcnt16 as well, but opts-GCC.h expects __lzcnt for uint16_t and uint32_t +// FIXME: this requires the ABM instruction set extension and shouldn't be enabled if it isn't available #if defined(_M_IX86) || defined(_M_AMD64) #define __builtin_clz __lzcnt #endif // defined(_M_IX86) || defined(_M_AMD64) @@ -64,14 +65,14 @@ Softfloat 3 MAME modifications #define __builtin_clzll __lzcnt64 #endif // defined(_M_AMD64) -#else // defined(_MSC_VER) +#else // defined(_MSC_VER) && !defined(__clang__)) -// true for GCC and Clang on Intel and ARM, and MSVC on Intel. #define SOFTFLOAT_BUILTIN_CLZ 1 -#if defined(PTR64) + +#if defined(__SIZEOF_INT128__) #define SOFTFLOAT_INTRINSIC_INT128 1 -#endif // defined(PTR64) +#endif // defined(__SIZEOF_INT128__) -#endif // defined(_MSC_VER) +#endif // defined(_MSC_VER) && !defined(__clang__) #include "../../source/include/opts-GCC.h" |
