mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-02 10:10:37 +08:00
bug #1178: Simplified modification of the SSE control register for better portability
This commit is contained in:
parent
b4388ee38b
commit
ea12669f7a
@ -44,15 +44,10 @@
|
|||||||
#define BTL_ASM_COMMENT(X)
|
#define BTL_ASM_COMMENT(X)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined __GNUC__) && (!defined __INTEL_COMPILER) && !defined(__arm__) && !defined(__powerpc__)
|
#ifdef __SSE__
|
||||||
#define BTL_DISABLE_SSE_EXCEPTIONS() { \
|
#include "xmmintrin.h"
|
||||||
int aux; \
|
// This enables flush to zero (FTZ) and denormals are zero (DAZ) modes:
|
||||||
asm( \
|
#define BTL_DISABLE_SSE_EXCEPTIONS() { _mm_setcsr(_mm_getcsr() | 0x8040); }
|
||||||
"stmxcsr %[aux] \n\t" \
|
|
||||||
"orl $32832, %[aux] \n\t" \
|
|
||||||
"ldmxcsr %[aux] \n\t" \
|
|
||||||
: : [aux] "m" (aux)); \
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
#define BTL_DISABLE_SSE_EXCEPTIONS()
|
#define BTL_DISABLE_SSE_EXCEPTIONS()
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user