From f0732426f21424441d365d96a73090b2b19e1d0f Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 18 Sep 2012 15:08:36 -0700 Subject: [PATCH] Precision control bits don't exist with SSE --- Alc/helpers.c | 9 ++++----- 1 file 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); -- 2.11.4.GIT