diff options
author | Chris Robinson <[email protected]> | 2012-09-18 15:08:36 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-09-18 15:08:36 -0700 |
commit | f0732426f21424441d365d96a73090b2b19e1d0f (patch) | |
tree | 91fefa454cf9079b265fbd959972996eda4eae45 /Alc/helpers.c | |
parent | eedbd1e81cab04d627e2ba8942f6eb48bffe07b1 (diff) |
Precision control bits don't exist with SSE
Diffstat (limited to 'Alc/helpers.c')
-rw-r--r-- | Alc/helpers.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Alc/helpers.c b/Alc/helpers.c index 0f254533..03672a17 100644 --- a/Alc/helpers.c +++ b/Alc/helpers.c @@ -194,9 +194,8 @@ void SetMixerFPUMode(FPUCtl *ctl) int sseState; __asm__ __volatile__("stmxcsr %0" : "=m" (*&sseState)); ctl->sse_state = sseState; - sseState &= ~0x300; /* clear precision to single */ - sseState |= 0xC00; /* set round-to-zero */ - sseState |= 0x8000; /* set flush-to-zero */ + sseState |= 0x0C00; /* set round-to-zero */ + sseState |= 0x8000; /* set flush-to-zero */ __asm__ __volatile__("ldmxcsr %0" : : "m" (*&sseState)); } #endif @@ -206,7 +205,7 @@ void SetMixerFPUMode(FPUCtl *ctl) __control87_2(_RC_CHOP|_PC_24, _MCW_RC|_MCW_PC, &mode, NULL); #ifdef HAVE_SSE if((CPUCapFlags&CPU_CAP_SSE)) - __control87_2(_RC_CHOP|_PC_24|_DN_FLUSH, _MCW_RC|_MCW_PC|_MCW_DN, NULL, &mode); + __control87_2(_RC_CHOP|_DN_FLUSH, _MCW_RC|_MCW_DN, NULL, &mode); #endif #elif defined(HAVE__CONTROLFP) ctl->state = _controlfp(0, 0); @@ -233,7 +232,7 @@ void RestoreFPUMode(const FPUCtl *ctl) __control87_2(ctl->state, _MCW_RC|_MCW_PC, &mode, NULL); #ifdef HAVE_SSE if((CPUCapFlags&CPU_CAP_SSE)) - __control87_2(ctl->sse_state, _MCW_RC|_MCW_PC|_MCW_DN, NULL, &mode); + __control87_2(ctl->sse_state, _MCW_RC|_MCW_DN, NULL, &mode); #endif #elif defined(HAVE__CONTROLFP) _controlfp(ctl->state, _MCW_RC|_MCW_PC); |