Imt.Base C++ API V4.1.1.0
Loading...
Searching...
No Matches
bsd_ieeefp.h File Reference

Go to the source code of this file.

Macros

#define fp_except_t   int
 
#define FP_X_INV   0x01 /* invalid operation */
 
#define FP_X_DNML   0x02 /* denormal */
 
#define FP_X_DZ   0x04 /* zero divide */
 
#define FP_X_OFL   0x08 /* overflow */
 
#define FP_X_UFL   0x10 /* underflow */
 
#define FP_X_IMP   0x20 /* (im)precision */
 
#define FP_X_STK   0x40 /* stack fault */
 
#define FP_MSKS_FLD   0x3f /* exception masks field */
 
#define FP_PRC_FLD   0x300 /* precision control field */
 
#define FP_RND_FLD   0xc00 /* rounding control field */
 
#define FP_STKY_FLD   0x3f /* sticky flags field */
 
#define FP_MSKS_OFF   0 /* exception masks offset */
 
#define FP_PRC_OFF   8 /* precision control offset */
 
#define FP_RND_OFF   10 /* rounding control offset */
 
#define FP_STKY_OFF   0 /* sticky flags offset */
 
#define __fldcw(addr)   __asm __volatile("fldcw %0" : : "m" (*(addr)))
 
#define __fldenv(addr)   __asm __volatile("fldenv %0" : : "m" (*(addr)))
 
#define __fnclex()   __asm __volatile("fnclex")
 
#define __fnstcw(addr)   __asm __volatile("fnstcw %0" : "=m" (*(addr)))
 
#define __fnstenv(addr)   __asm __volatile("fnstenv %0" : "=m" (*(addr)))
 
#define __fnstsw(addr)   __asm __volatile("fnstsw %0" : "=m" (*(addr)))
 

Enumerations

enum  fp_rnd_t { FP_RN =0 , FP_RM , FP_RP , FP_RZ }
 
enum  fp_prec_t { FP_PS =0 , FP_PRS , FP_PD , FP_PE }
 

Functions

OLM_DLLEXPORT fp_prec_t fpgetprec (void)
 
OLM_DLLEXPORT fp_prec_t fpsetprec (fp_prec_t _m)
 

Macro Definition Documentation

◆ __fldcw

#define __fldcw (   addr)    __asm __volatile("fldcw %0" : : "m" (*(addr)))

Definition at line 116 of file bsd_ieeefp.h.

◆ __fldenv

#define __fldenv (   addr)    __asm __volatile("fldenv %0" : : "m" (*(addr)))

Definition at line 117 of file bsd_ieeefp.h.

◆ __fnclex

#define __fnclex ( )    __asm __volatile("fnclex")

Definition at line 118 of file bsd_ieeefp.h.

◆ __fnstcw

#define __fnstcw (   addr)    __asm __volatile("fnstcw %0" : "=m" (*(addr)))

Definition at line 119 of file bsd_ieeefp.h.

◆ __fnstenv

#define __fnstenv (   addr)    __asm __volatile("fnstenv %0" : "=m" (*(addr)))

Definition at line 120 of file bsd_ieeefp.h.

◆ __fnstsw

#define __fnstsw (   addr)    __asm __volatile("fnstsw %0" : "=m" (*(addr)))

Definition at line 121 of file bsd_ieeefp.h.

◆ fp_except_t

#define fp_except_t   int

Definition at line 76 of file bsd_ieeefp.h.

◆ FP_MSKS_FLD

#define FP_MSKS_FLD   0x3f /* exception masks field */

Definition at line 92 of file bsd_ieeefp.h.

◆ FP_MSKS_OFF

#define FP_MSKS_OFF   0 /* exception masks offset */

Definition at line 104 of file bsd_ieeefp.h.

◆ FP_PRC_FLD

#define FP_PRC_FLD   0x300 /* precision control field */

Definition at line 93 of file bsd_ieeefp.h.

◆ FP_PRC_OFF

#define FP_PRC_OFF   8 /* precision control offset */

Definition at line 105 of file bsd_ieeefp.h.

◆ FP_RND_FLD

#define FP_RND_FLD   0xc00 /* rounding control field */

Definition at line 94 of file bsd_ieeefp.h.

◆ FP_RND_OFF

#define FP_RND_OFF   10 /* rounding control offset */

Definition at line 106 of file bsd_ieeefp.h.

◆ FP_STKY_FLD

#define FP_STKY_FLD   0x3f /* sticky flags field */

Definition at line 99 of file bsd_ieeefp.h.

◆ FP_STKY_OFF

#define FP_STKY_OFF   0 /* sticky flags offset */

Definition at line 111 of file bsd_ieeefp.h.

◆ FP_X_DNML

#define FP_X_DNML   0x02 /* denormal */

Definition at line 82 of file bsd_ieeefp.h.

◆ FP_X_DZ

#define FP_X_DZ   0x04 /* zero divide */

Definition at line 83 of file bsd_ieeefp.h.

◆ FP_X_IMP

#define FP_X_IMP   0x20 /* (im)precision */

Definition at line 86 of file bsd_ieeefp.h.

◆ FP_X_INV

#define FP_X_INV   0x01 /* invalid operation */

Definition at line 81 of file bsd_ieeefp.h.

◆ FP_X_OFL

#define FP_X_OFL   0x08 /* overflow */

Definition at line 84 of file bsd_ieeefp.h.

◆ FP_X_STK

#define FP_X_STK   0x40 /* stack fault */

Definition at line 87 of file bsd_ieeefp.h.

◆ FP_X_UFL

#define FP_X_UFL   0x10 /* underflow */

Definition at line 85 of file bsd_ieeefp.h.

Enumeration Type Documentation

◆ fp_prec_t

enum fp_prec_t
Enumerator
FP_PS 
FP_PRS 
FP_PD 
FP_PE 

Definition at line 69 of file bsd_ieeefp.h.

◆ fp_rnd_t

enum fp_rnd_t
Enumerator
FP_RN 
FP_RM 
FP_RP 
FP_RZ 

Definition at line 59 of file bsd_ieeefp.h.

Function Documentation

◆ fpgetprec()

OLM_DLLEXPORT fp_prec_t fpgetprec ( void  )

Definition at line 176 of file bsd_ieeefp.h.

◆ fpsetprec()

OLM_DLLEXPORT fp_prec_t fpsetprec ( fp_prec_t  _m)

Definition at line 186 of file bsd_ieeefp.h.