newlib/winsup/mingw/mingwex/fegetexceptflag.c
Danny Smith 5092e4a714 * mingwex/feclearexcept.c (feclearexcept): Change declaration.
Do not return a value.
	* mingwex/fegetexceptflag.c (fegetexceptflag): Likewise.
	* mingwex/feraiseexcept.c (feraiseexcept): Likewise.
	* mingwex/fesetexceptflag.c (fesetexceptflag): Likewise.
	* mingwex/fegetenv.c (fegetenv): Likewise.
	* mingwex/fesetenv.c (fesetenv): Likewise.
	* mingwex/feupdateenv.c (feupdateenv): Likewise.
	* include/fenv.h (feclearexcept, fegetexceptflag, feraiseexcept,
	fesetexceptflag, fegetenv, fesetenv, feupdateenv): Correct
	prototypes.
2005-08-25 02:35:34 +00:00

15 lines
392 B
C

#include <fenv.h>
/* 7.6.2.2
The fegetexceptflag function stores an implementation-defined
representation of the exception flags indicated by the argument
excepts in the object pointed to by the argument flagp. */
void fegetexceptflag (fexcept_t * flagp, int excepts)
{
unsigned short _sw;
__asm__ ("fnstsw %%ax;": "=a" (_sw));
*flagp = _sw & excepts & FE_ALL_EXCEPT;
}