ReactOS 0.4.16-dev-2104-gb84fa49
clearfp.c File Reference
#include <precomp.h>
Include dependency graph for clearfp.c:

Go to the source code of this file.

Functions

unsigned int _statusfp (void)
 
unsigned int CDECL _clearfp (void)
 

Function Documentation

◆ _clearfp()

unsigned int CDECL _clearfp ( void  )

Definition at line 18 of file clearfp.c.

19{
20 unsigned int retVal = _statusfp();
21#if defined(__GNUC__)
22 __asm__ __volatile__( "fnclex" );
23#else
24 __asm fnclex;
25#endif
26 return retVal;
27}
unsigned int _statusfp(void)
Definition: math.c:1156
__asm__(".p2align 4, 0x90\n" ".seh_proc __seh2_global_filter_func\n" "__seh2_global_filter_func:\n" "\tsub %rbp, %rax\n" "\tpush %rbp\n" "\t.seh_pushreg %rbp\n" "\tsub $32, %rsp\n" "\t.seh_stackalloc 32\n" "\t.seh_endprologue\n" "\tsub %rax, %rdx\n" "\tmov %rdx, %rbp\n" "\tjmp *%r8\n" "__seh2_global_filter_func_exit:\n" "\t.p2align 4\n" "\tadd $32, %rsp\n" "\tpop %rbp\n" "\tret\n" "\t.seh_endproc")

Referenced by main(), Test_exceptions(), and test_fenv().

◆ _statusfp()

unsigned int _statusfp ( void  )

Definition at line 1156 of file math.c.

1157{
1158 unsigned int flags = 0;
1159#if defined(__i386__)
1160 unsigned int x86_sw, sse2_sw;
1161
1162 _statusfp2( &x86_sw, &sse2_sw );
1163 /* FIXME: there's no definition for ambiguous status, just return all status bits for now */
1164 flags = x86_sw | sse2_sw;
1165#else
1166 _setfp(NULL, 0, &flags, 0);
1167#endif
1168 return flags;
1169}
#define NULL
Definition: types.h:112
static void _setfp(unsigned int *cw, unsigned int cw_mask, unsigned int *sw, unsigned int sw_mask)
Definition: math.c:842
GLbitfield flags
Definition: glext.h:7161

Referenced by _clearfp().