Commit 4ecf271b authored by Michael R. Crusoe's avatar Michael R. Crusoe Committed by Michael R. Crusoe

emscripten; use `__builtin_roundeven{f,}` from version 3.1.43 onwards

parent 347e2b69
...@@ -184,6 +184,7 @@ ...@@ -184,6 +184,7 @@
# undef HEDLEY_EMSCRIPTEN_VERSION # undef HEDLEY_EMSCRIPTEN_VERSION
#endif #endif
#if defined(__EMSCRIPTEN__) #if defined(__EMSCRIPTEN__)
# include <emscripten.h>
# define HEDLEY_EMSCRIPTEN_VERSION HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) # define HEDLEY_EMSCRIPTEN_VERSION HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__)
#endif #endif
......
...@@ -1266,7 +1266,7 @@ simde_math_fpclass(double v, const int imm8) { ...@@ -1266,7 +1266,7 @@ simde_math_fpclass(double v, const int imm8) {
#if !defined(simde_math_roundeven) #if !defined(simde_math_roundeven)
#if \ #if \
(!defined(HEDLEY_EMSCRIPTEN_VERSION) && HEDLEY_HAS_BUILTIN(__builtin_roundeven)) || \ ((!defined(HEDLEY_EMSCRIPTEN_VERSION) || HEDLEY_EMSCRIPTEN_VERSION_CHECK(3, 1, 43)) && HEDLEY_HAS_BUILTIN(__builtin_roundeven)) || \
HEDLEY_GCC_VERSION_CHECK(10,0,0) HEDLEY_GCC_VERSION_CHECK(10,0,0)
#define simde_math_roundeven(v) __builtin_roundeven(v) #define simde_math_roundeven(v) __builtin_roundeven(v)
#elif defined(simde_math_round) && defined(simde_math_fabs) #elif defined(simde_math_round) && defined(simde_math_fabs)
...@@ -1286,7 +1286,7 @@ simde_math_fpclass(double v, const int imm8) { ...@@ -1286,7 +1286,7 @@ simde_math_fpclass(double v, const int imm8) {
#if !defined(simde_math_roundevenf) #if !defined(simde_math_roundevenf)
#if \ #if \
(!defined(HEDLEY_EMSCRIPTEN_VERSION) && HEDLEY_HAS_BUILTIN(__builtin_roundevenf)) || \ ((!defined(HEDLEY_EMSCRIPTEN_VERSION) || HEDLEY_EMSCRIPTEN_VERSION_CHECK(3, 1, 43)) && HEDLEY_HAS_BUILTIN(__builtin_roundevenf)) || \
HEDLEY_GCC_VERSION_CHECK(10,0,0) HEDLEY_GCC_VERSION_CHECK(10,0,0)
#define simde_math_roundevenf(v) __builtin_roundevenf(v) #define simde_math_roundevenf(v) __builtin_roundevenf(v)
#elif defined(simde_math_roundf) && defined(simde_math_fabsf) #elif defined(simde_math_roundf) && defined(simde_math_fabsf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment