ape: sync flaot.h macros with u.h
The float.h macros got out of sync with u.h, some of them missing and some of them being incorrect. This change brings them back in line.
This commit is contained in:
parent
491fe25158
commit
566c3ca2de
8 changed files with 97 additions and 55 deletions
|
@ -52,9 +52,10 @@ union FPdbleword
|
||||||
#ifdef _PLAN9_SOURCE
|
#ifdef _PLAN9_SOURCE
|
||||||
/* FCR */
|
/* FCR */
|
||||||
#define FPINEX (1<<5)
|
#define FPINEX (1<<5)
|
||||||
#define FPOVFL (1<<3)
|
|
||||||
#define FPUNFL ((1<<4)|(1<<1))
|
#define FPUNFL ((1<<4)|(1<<1))
|
||||||
|
#define FPOVFL (1<<3)
|
||||||
#define FPZDIV (1<<2)
|
#define FPZDIV (1<<2)
|
||||||
|
#define FPINVAL (1<<0)
|
||||||
#define FPRNR (0<<10)
|
#define FPRNR (0<<10)
|
||||||
#define FPRZ (3<<10)
|
#define FPRZ (3<<10)
|
||||||
#define FPRPINF (2<<10)
|
#define FPRPINF (2<<10)
|
||||||
|
@ -69,5 +70,6 @@ union FPdbleword
|
||||||
#define FPAOVFL FPOVFL
|
#define FPAOVFL FPOVFL
|
||||||
#define FPAUNFL FPUNFL
|
#define FPAUNFL FPUNFL
|
||||||
#define FPAZDIV FPZDIV
|
#define FPAZDIV FPZDIV
|
||||||
|
#define FPAINVAL FPINVAL
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -58,6 +58,7 @@ union FPdbleword
|
||||||
#define FPZDIV (1<<10)
|
#define FPZDIV (1<<10)
|
||||||
#define FPRNR (0<<4)
|
#define FPRNR (0<<4)
|
||||||
#define FPRZ (1<<4)
|
#define FPRZ (1<<4)
|
||||||
|
#define FPINVAL (3<<13)
|
||||||
#define FPRPINF (3<<4)
|
#define FPRPINF (3<<4)
|
||||||
#define FPRNINF (2<<4)
|
#define FPRNINF (2<<4)
|
||||||
#define FPRMASK (3<<4)
|
#define FPRMASK (3<<4)
|
||||||
|
@ -70,5 +71,6 @@ union FPdbleword
|
||||||
#define FPAOVFL FPOVFL
|
#define FPAOVFL FPOVFL
|
||||||
#define FPAUNFL FPUNFL
|
#define FPAUNFL FPUNFL
|
||||||
#define FPAZDIV FPZDIV
|
#define FPAZDIV FPZDIV
|
||||||
|
#define FPAINVAL FPINVAL
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -50,24 +50,30 @@ union FPdbleword
|
||||||
#define Sudden_Underflow 1
|
#define Sudden_Underflow 1
|
||||||
#endif
|
#endif
|
||||||
#ifdef _PLAN9_SOURCE
|
#ifdef _PLAN9_SOURCE
|
||||||
/* FCR */
|
/* VFP FPSCR (exceptions) */
|
||||||
#define FPINEX (1<<5)
|
#define FPINEX (1<<12)
|
||||||
#define FPOVFL (1<<3)
|
#define FPUNFL (1<<11)
|
||||||
#define FPUNFL ((1<<4)|(1<<1))
|
#define FPOVFL (1<<10)
|
||||||
#define FPZDIV (1<<2)
|
#define FPZDIV (1<<9)
|
||||||
#define FPRNR (0<<10)
|
#define FPINVAL (1<<8)
|
||||||
#define FPRZ (3<<10)
|
|
||||||
#define FPRPINF (2<<10)
|
/* VFP FPSCR (rounding) */
|
||||||
#define FPRNINF (1<<10)
|
#define FPRNR (0<<22)
|
||||||
#define FPRMASK (3<<10)
|
#define FPRPINF (1<<22)
|
||||||
#define FPPEXT (3<<8)
|
#define FPRNINF (2<<22)
|
||||||
#define FPPSGL (0<<8)
|
#define FPRZ (3<<22)
|
||||||
#define FPPDBL (2<<8)
|
|
||||||
#define FPPMASK (3<<8)
|
#define FPRMASK (3<<22)
|
||||||
/* FSR */
|
|
||||||
#define FPAINEX FPINEX
|
/* VFP FPSCR (status) */
|
||||||
#define FPAOVFL FPOVFL
|
#define FPPEXT 0
|
||||||
#define FPAUNFL FPUNFL
|
#define FPPSGL 0
|
||||||
#define FPAZDIV FPZDIV
|
#define FPPDBL 0
|
||||||
|
#define FPPMASK 0
|
||||||
|
#define FPAINEX (1<<4)
|
||||||
|
#define FPAUNFL (1<<3)
|
||||||
|
#define FPAOVFL (1<<2)
|
||||||
|
#define FPAZDIV (1<<1)
|
||||||
|
#define FPAINVAL (1<<0)
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -50,24 +50,29 @@ union FPdbleword
|
||||||
#define Sudden_Underflow 1
|
#define Sudden_Underflow 1
|
||||||
#endif
|
#endif
|
||||||
#ifdef _PLAN9_SOURCE
|
#ifdef _PLAN9_SOURCE
|
||||||
/* FCR */
|
/* FPCR (control) */
|
||||||
#define FPINEX (1<<5)
|
#define FPINEX (1<<12)
|
||||||
#define FPOVFL (1<<3)
|
#define FPUNFL (1<<11)
|
||||||
#define FPUNFL ((1<<4)|(1<<1))
|
#define FPOVFL (1<<10)
|
||||||
#define FPZDIV (1<<2)
|
#define FPZDIV (1<<9)
|
||||||
#define FPRNR (0<<10)
|
#define FPINVAL (1<<8)
|
||||||
#define FPRZ (3<<10)
|
|
||||||
#define FPRPINF (2<<10)
|
#define FPRNR (0<<22)
|
||||||
#define FPRNINF (1<<10)
|
#define FPRPINF (1<<22)
|
||||||
#define FPRMASK (3<<10)
|
#define FPRNINF (2<<22)
|
||||||
#define FPPEXT (3<<8)
|
#define FPRZ (3<<22)
|
||||||
#define FPPSGL (0<<8)
|
|
||||||
#define FPPDBL (2<<8)
|
#define FPRMASK (3<<22)
|
||||||
#define FPPMASK (3<<8)
|
|
||||||
/* FSR */
|
/* FPSR (status) */
|
||||||
#define FPAINEX FPINEX
|
#define FPPEXT 0
|
||||||
#define FPAOVFL FPOVFL
|
#define FPPSGL 0
|
||||||
#define FPAUNFL FPUNFL
|
#define FPPDBL 0
|
||||||
#define FPAZDIV FPZDIV
|
#define FPPMASK 0
|
||||||
|
#define FPAINEX (1<<4)
|
||||||
|
#define FPAUNFL (1<<3)
|
||||||
|
#define FPAOVFL (1<<2)
|
||||||
|
#define FPAZDIV (1<<1)
|
||||||
|
#define FPAINVAL (1<<0)
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -52,9 +52,10 @@ union FPdbleword
|
||||||
#ifdef _PLAN9_SOURCE
|
#ifdef _PLAN9_SOURCE
|
||||||
/* FCR */
|
/* FCR */
|
||||||
#define FPINEX (1<<7)
|
#define FPINEX (1<<7)
|
||||||
#define FPOVFL (1<<9)
|
|
||||||
#define FPUNFL (1<<8)
|
#define FPUNFL (1<<8)
|
||||||
|
#define FPOVFL (1<<9)
|
||||||
#define FPZDIV (1<<10)
|
#define FPZDIV (1<<10)
|
||||||
|
#define FPINVAL (1<<11)
|
||||||
#define FPRNR (0<<0)
|
#define FPRNR (0<<0)
|
||||||
#define FPRZ (1<<0)
|
#define FPRZ (1<<0)
|
||||||
#define FPRPINF (2<<0)
|
#define FPRPINF (2<<0)
|
||||||
|
@ -69,5 +70,6 @@ union FPdbleword
|
||||||
#define FPAOVFL (1<<4)
|
#define FPAOVFL (1<<4)
|
||||||
#define FPAUNFL (1<<3)
|
#define FPAUNFL (1<<3)
|
||||||
#define FPAZDIV (1<<5)
|
#define FPAZDIV (1<<5)
|
||||||
|
#define FPAINVAL (1<<6)
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -50,24 +50,45 @@ union FPdbleword
|
||||||
#define Sudden_Underflow 1
|
#define Sudden_Underflow 1
|
||||||
#endif
|
#endif
|
||||||
#ifdef _PLAN9_SOURCE
|
#ifdef _PLAN9_SOURCE
|
||||||
/* FCR */
|
/* FPSCR */
|
||||||
#define FPINEX (1<<7)
|
#define FPSFX (1<<31) /* exception summary (sticky) */
|
||||||
#define FPOVFL (1<<9)
|
#define FPSEX (1<<30) /* enabled exception summary */
|
||||||
#define FPUNFL (1<<8)
|
#define FPSVX (1<<29) /* invalid operation exception summary */
|
||||||
#define FPZDIV (1<<10)
|
#define FPSOX (1<<28) /* overflow exception OX (sticky) */
|
||||||
|
#define FPSUX (1<<27) /* underflow exception UX (sticky) */
|
||||||
|
#define FPSZX (1<<26) /* zero divide exception ZX (sticky) */
|
||||||
|
#define FPSXX (1<<25) /* inexact exception XX (sticky) */
|
||||||
|
#define FPSVXSNAN (1<<24) /* invalid operation exception for SNaN (sticky) */
|
||||||
|
#define FPSVXISI (1<<23) /* invalid operation exception for â-â (sticky) */
|
||||||
|
#define FPSVXIDI (1<<22) /* invalid operation exception for â/â (sticky) */
|
||||||
|
#define FPSVXZDZ (1<<21) /* invalid operation exception for 0/0 (sticky) */
|
||||||
|
#define FPSVXIMZ (1<<20) /* invalid operation exception for â*0 (sticky) */
|
||||||
|
#define FPSVXVC (1<<19) /* invalid operation exception for invalid compare (sticky) */
|
||||||
|
#define FPSFR (1<<18) /* fraction rounded */
|
||||||
|
#define FPSFI (1<<17) /* fraction inexact */
|
||||||
|
#define FPSFPRF (1<<16) /* floating point result class */
|
||||||
|
#define FPSFPCC (0xF<<12) /* <, >, =, unordered */
|
||||||
|
#define FPVXCVI (1<<8) /* enable exception for invalid integer convert (sticky) */
|
||||||
|
#define FPVE (1<<7) /* invalid operation exception enable */
|
||||||
|
#define FPOVFL (1<<6) /* enable overflow exceptions */
|
||||||
|
#define FPUNFL (1<<5) /* enable underflow */
|
||||||
|
#define FPZDIV (1<<4) /* enable zero divide */
|
||||||
|
#define FPINEX (1<<3) /* enable inexact exceptions */
|
||||||
|
#define FPRMASK (3<<0) /* rounding mode */
|
||||||
#define FPRNR (0<<0)
|
#define FPRNR (0<<0)
|
||||||
#define FPRZ (1<<0)
|
#define FPRZ (1<<0)
|
||||||
#define FPRPINF (2<<0)
|
#define FPRPINF (2<<0)
|
||||||
#define FPRNINF (3<<0)
|
#define FPRNINF (3<<0)
|
||||||
#define FPRMASK (3<<0)
|
|
||||||
#define FPPEXT 0
|
#define FPPEXT 0
|
||||||
#define FPPSGL 0
|
#define FPPSGL 0
|
||||||
#define FPPDBL 0
|
#define FPPDBL 0
|
||||||
#define FPPMASK 0
|
#define FPPMASK 0
|
||||||
/* FSR */
|
#define FPINVAL FPVE
|
||||||
#define FPAINEX (1<<2)
|
|
||||||
#define FPAOVFL (1<<4)
|
#define FPAOVFL FPSOX
|
||||||
#define FPAUNFL (1<<3)
|
#define FPAINEX FPSXX
|
||||||
#define FPAZDIV (1<<5)
|
#define FPAUNFL FPSUX
|
||||||
|
#define FPAZDIV FPSZX
|
||||||
|
#define FPAINVAL FPSVX
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -57,6 +57,7 @@ union FPdbleword
|
||||||
#define FPZDIV (1<<24)
|
#define FPZDIV (1<<24)
|
||||||
#define FPRNR (0<<30)
|
#define FPRNR (0<<30)
|
||||||
#define FPRZ (1<<30)
|
#define FPRZ (1<<30)
|
||||||
|
#define FPINVAL (1<<27)
|
||||||
#define FPRPINF (2<<30)
|
#define FPRPINF (2<<30)
|
||||||
#define FPRNINF (3<<30)
|
#define FPRNINF (3<<30)
|
||||||
#define FPRMASK (3<<30)
|
#define FPRMASK (3<<30)
|
||||||
|
@ -66,8 +67,9 @@ union FPdbleword
|
||||||
#define FPPMASK 0
|
#define FPPMASK 0
|
||||||
/* FSR */
|
/* FSR */
|
||||||
#define FPAINEX (1<<5)
|
#define FPAINEX (1<<5)
|
||||||
#define FPAOVFL (1<<8)
|
|
||||||
#define FPAUNFL (1<<7)
|
|
||||||
#define FPAZDIV (1<<6)
|
#define FPAZDIV (1<<6)
|
||||||
|
#define FPAUNFL (1<<7)
|
||||||
|
#define FPAOVFL (1<<8)
|
||||||
|
#define FPAINVAL (1<<9)
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
|
@ -57,6 +57,7 @@ union FPdbleword
|
||||||
#define FPZDIV (1<<24)
|
#define FPZDIV (1<<24)
|
||||||
#define FPRNR (0<<30)
|
#define FPRNR (0<<30)
|
||||||
#define FPRZ (1<<30)
|
#define FPRZ (1<<30)
|
||||||
|
#define FPINVAL (1<<27)
|
||||||
#define FPRPINF (2<<30)
|
#define FPRPINF (2<<30)
|
||||||
#define FPRNINF (3<<30)
|
#define FPRNINF (3<<30)
|
||||||
#define FPRMASK (3<<30)
|
#define FPRMASK (3<<30)
|
||||||
|
@ -66,8 +67,9 @@ union FPdbleword
|
||||||
#define FPPMASK 0
|
#define FPPMASK 0
|
||||||
/* FSR */
|
/* FSR */
|
||||||
#define FPAINEX (1<<5)
|
#define FPAINEX (1<<5)
|
||||||
#define FPAOVFL (1<<8)
|
|
||||||
#define FPAUNFL (1<<7)
|
|
||||||
#define FPAZDIV (1<<6)
|
#define FPAZDIV (1<<6)
|
||||||
|
#define FPAUNFL (1<<7)
|
||||||
|
#define FPAOVFL (1<<8)
|
||||||
|
#define FPAINVAL (1<<9)
|
||||||
#endif
|
#endif
|
||||||
#endif /* __FLOAT */
|
#endif /* __FLOAT */
|
||||||
|
|
Loading…
Reference in a new issue