msvcrt: Implemented _fpreset for SSE2 and x86_64.

This commit is contained in:
Alexandre Julliard 2011-01-25 22:12:16 +01:00
parent 98d7a021d6
commit c74f6ca570
1 changed files with 9 additions and 3 deletions

View File

@ -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
}