From cbdf1e6c095ed6d5a14f62d2b3ae967e4a7b076b Mon Sep 17 00:00:00 2001 From: XMRig Date: Sun, 22 Sep 2019 00:59:53 +0700 Subject: [PATCH] Revert instructions_portable.cpp to avoid warning on gcc compilers. --- src/crypto/randomx/instructions_portable.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/crypto/randomx/instructions_portable.cpp b/src/crypto/randomx/instructions_portable.cpp index d08ee5870..b28203a9c 100644 --- a/src/crypto/randomx/instructions_portable.cpp +++ b/src/crypto/randomx/instructions_portable.cpp @@ -82,12 +82,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define HAVE_SETROUNDMODE_IMPL #endif -#ifndef HAVE_SETROUNDMODE_IMPL - static void setRoundMode_(uint32_t mode) { - fesetround(mode); - } -#endif - #ifndef HAVE_ROTR64 uint64_t rotr64(uint64_t a, unsigned int b) { return (a >> b) | (a << (-b & 63)); @@ -133,6 +127,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifdef RANDOMX_DEFAULT_FENV +# ifndef HAVE_SETROUNDMODE_IMPL + static void setRoundMode_(uint32_t mode) { + fesetround(mode); + } +# endif + void rx_reset_float_state() { setRoundMode_(FE_TONEAREST); rx_set_double_precision(); //set precision to 53 bits if needed by the platform