Module: wine Branch: master Commit: c74f6ca570ba1f5209888f0d1ed92b0ed29f0a8b URL: http://source.winehq.org/git/wine.git/?a=commit;h=c74f6ca570ba1f5209888f0d1e...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Jan 25 22:12:16 2011 +0100
msvcrt: Implemented _fpreset for SSE2 and x86_64.
---
dlls/msvcrt/math.c | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 6755fbb..306ad1d 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -1111,10 +1111,16 @@ int CDECL _finite(double num) */ void CDECL _fpreset(void) { -#if defined(__GNUC__) && defined(__i386__) - __asm__ __volatile__( "fninit" ); +#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + const unsigned int x86_cw = 0x27f; + __asm__ __volatile__( "fninit; fldcw %0" : : "m" (x86_cw) ); + if (sse2_supported) + { + const unsigned long sse2_cw = 0x1f80; + __asm__ __volatile__( "ldmxcsr %0" : : "m" (sse2_cw) ); + } #else - FIXME(":Not Implemented!\n"); + FIXME( "not implemented\n" ); #endif }