|
|
@ -44,7 +44,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include <float.h> |
|
|
|
#include <float.h> |
|
|
|
|
|
|
|
|
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) |
|
|
|
#include <fpu_control.h> |
|
|
|
#include <fpu_control.h> |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
@ -58,7 +58,7 @@ namespace |
|
|
|
~FpuControl(); |
|
|
|
~FpuControl(); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined (__aarch64__) |
|
|
|
fpu_control_t fpu_oldcw, fpu_cw; |
|
|
|
fpu_control_t fpu_oldcw, fpu_cw; |
|
|
|
#elif defined(_WIN32) && !defined(_WIN64) |
|
|
|
#elif defined(_WIN32) && !defined(_WIN64) |
|
|
|
unsigned int fpu_oldcw, fpu_cw; |
|
|
|
unsigned int fpu_oldcw, fpu_cw; |
|
|
@ -67,7 +67,7 @@ namespace |
|
|
|
|
|
|
|
|
|
|
|
FpuControl::FpuControl() |
|
|
|
FpuControl::FpuControl() |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) |
|
|
|
_FPU_GETCW(fpu_oldcw); |
|
|
|
_FPU_GETCW(fpu_oldcw); |
|
|
|
fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_DOUBLE & ~_FPU_SINGLE) | _FPU_SINGLE; |
|
|
|
fpu_cw = (fpu_oldcw & ~_FPU_EXTENDED & ~_FPU_DOUBLE & ~_FPU_SINGLE) | _FPU_SINGLE; |
|
|
|
_FPU_SETCW(fpu_cw); |
|
|
|
_FPU_SETCW(fpu_cw); |
|
|
@ -80,7 +80,7 @@ namespace |
|
|
|
|
|
|
|
|
|
|
|
FpuControl::~FpuControl() |
|
|
|
FpuControl::~FpuControl() |
|
|
|
{ |
|
|
|
{ |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) |
|
|
|
#if defined(__GNUC__) && !defined(__APPLE__) && !defined(__arm__) && !defined(__aarch64__) |
|
|
|
_FPU_SETCW(fpu_oldcw); |
|
|
|
_FPU_SETCW(fpu_oldcw); |
|
|
|
#elif defined(_WIN32) && !defined(_WIN64) |
|
|
|
#elif defined(_WIN32) && !defined(_WIN64) |
|
|
|
_controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC); |
|
|
|
_controlfp_s(&fpu_cw, fpu_oldcw, _MCW_PC); |
|
|
|