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) | ||||
| #endif | ||||
| 
 | ||||
| #if (defined __GNUC__) && (!defined __INTEL_COMPILER) && !defined(__arm__) && !defined(__powerpc__) | ||||
| #define BTL_DISABLE_SSE_EXCEPTIONS()  { \ | ||||
|   int aux; \ | ||||
|   asm( \ | ||||
|   "stmxcsr   %[aux]           \n\t" \ | ||||
|   "orl       $32832, %[aux]   \n\t" \ | ||||
|   "ldmxcsr   %[aux]           \n\t" \ | ||||
|   : : [aux] "m" (aux)); \ | ||||
| } | ||||
| #ifdef __SSE__ | ||||
| #include "xmmintrin.h" | ||||
| // This enables flush to zero (FTZ) and denormals are zero (DAZ) modes:
 | ||||
| #define BTL_DISABLE_SSE_EXCEPTIONS()  { _mm_setcsr(_mm_getcsr() | 0x8040); } | ||||
| #else | ||||
| #define BTL_DISABLE_SSE_EXCEPTIONS() | ||||
| #endif | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Christoph Hertzberg
						Christoph Hertzberg