ReactOS  0.4.14-dev-1112-g2b067d6
fpreset.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING.LIB in the top level directory
3  * PROJECT: ReactOS system libraries
4  * PURPOSE: Resets FPU state to the default
5  * PROGRAMER: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #include <precomp.h>
9 
10 /*********************************************************************
11  * _fpreset (MSVCRT.@)
12  */
13 void CDECL _fpreset(void)
14 {
15  const unsigned short x86_cw = 0x27f;
16 #ifdef _MSC_VER
17  __asm { fninit }
18  __asm { fldcw [x86_cw] }
19 #else
20  __asm__ __volatile__( "fninit; fldcw %0" : : "m" (x86_cw) );
21 #endif
23  {
24  const unsigned long sse2_cw = 0x1f80;
25 #ifdef _MSC_VER
26  __asm { ldmxcsr [sse2_cw] }
27 #else
28  __asm__ __volatile__( "ldmxcsr %0" : : "m" (sse2_cw) );
29 #endif
30  }
31 }
void CDECL _fpreset(void)
Definition: fpreset.c:13
__asm__("\t.globl GetPhys\n" "GetPhys:\t\n" "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" "andi. 6,5,0xffef\n\t" "mtmsr 6\n\t" "isync\n\t" "sync\n\t" "lwz 3,0(3)\n\t" "mtmsr 5\n\t" "isync\n\t" "sync\n\t" "lwz 0,0(1)\n\t" "addi 1,1,16\n\t" "mtlr 0\n\t" "blr")
BOOL WINAPI IsProcessorFeaturePresent(IN DWORD ProcessorFeature)
Definition: sysinfo.c:168
#define CDECL
Definition: compat.h:21
#define PF_XMMI64_INSTRUCTIONS_AVAILABLE