ReactOS 0.4.15-dev-8127-g6338913
_statusfp.c File Reference
#include "fpscr.h"
Include dependency graph for _statusfp.c:

Go to the source code of this file.

Functions

unsigned int _statusfp (void)
 

Function Documentation

◆ _statusfp()

unsigned int _statusfp ( void  )

Definition at line 10 of file _statusfp.c.

11{
12 unsigned int flags = 0;
13 ARM_FPSCR fpscr;
14
15 fpscr.raw = __getfp();
16
17 if (fpscr.data.exception & ARM_CW_IM) flags |= _SW_INVALID;
18 if (fpscr.data.exception & ARM_CW_ZM) flags |= _SW_ZERODIVIDE;
19 if (fpscr.data.exception & ARM_CW_OM) flags |= _SW_OVERFLOW;
20 if (fpscr.data.exception & ARM_CW_UM) flags |= _SW_UNDERFLOW;
21 if (fpscr.data.exception & ARM_CW_PM) flags |= _SW_INEXACT;
22 if (fpscr.data.exception & ARM_CW_DM) flags |= _SW_DENORMAL;
23 return flags;
24}
#define ARM_CW_PM
Definition: fpscr.h:15
#define ARM_CW_UM
Definition: fpscr.h:14
#define ARM_CW_OM
Definition: fpscr.h:13
#define ARM_CW_DM
Definition: fpscr.h:16
#define ARM_CW_IM
Definition: fpscr.h:11
#define ARM_CW_ZM
Definition: fpscr.h:12
unsigned int __getfp(void)
GLbitfield flags
Definition: glext.h:7161
#define _SW_INEXACT
Definition: float.h:85
#define _SW_OVERFLOW
Definition: float.h:87
#define _SW_DENORMAL
Definition: float.h:90
#define _SW_ZERODIVIDE
Definition: float.h:88
#define _SW_UNDERFLOW
Definition: float.h:86
#define _SW_INVALID
Definition: float.h:89
unsigned int raw
Definition: fpscr.h:25
struct _ARM_FPSCR::@4310 data