Fix for win32 build with gcc

This commit is contained in:
Howard Chu 2019-09-25 11:49:34 +01:00
parent a3d830064b
commit 1694aa825d
2 changed files with 2 additions and 2 deletions

View File

@ -161,7 +161,7 @@ void rx_set_rounding_mode(uint32_t mode) {
#ifdef RANDOMX_USE_X87 #ifdef RANDOMX_USE_X87
#ifdef _M_IX86 #if defined(_MSC_VER) && defined(_M_IX86)
void rx_set_double_precision() { void rx_set_double_precision() {
_control87(_PC_53, _MCW_PC); _control87(_PC_53, _MCW_PC);

View File

@ -61,7 +61,7 @@ constexpr int RoundToZero = 3;
//the library "sqrt" function provided by MSVC for x86 targets doesn't give //the library "sqrt" function provided by MSVC for x86 targets doesn't give
//the correct results, so we have to use inline assembly to call x87 fsqrt directly //the correct results, so we have to use inline assembly to call x87 fsqrt directly
#if !defined(__SSE2__) #if !defined(__SSE2__)
#if defined(_M_IX86) #if defined(_MSC_VER) && defined(_M_IX86)
inline double __cdecl rx_sqrt(double x) { inline double __cdecl rx_sqrt(double x) {
__asm { __asm {
fld x fld x