Dataflow Runtime API  4.0.1.0
Macros | Typedefs | Functions | Variables
openlibm_fenv_riscv.h File Reference
#include <stdint.h>
#include "../inc/cdefs-compat.h"

Macros

#define __fenv_static   static
 
#define FE_INVALID   0x0010
 
#define FE_DIVBYZERO   0x0008
 
#define FE_OVERFLOW   0x0004
 
#define FE_UNDERFLOW   0x0002
 
#define FE_INEXACT   0x0001
 
#define FE_ALL_EXCEPT
 
#define _ROUND_SHIFT   5
 
#define FE_TONEAREST   (0x00 << _ROUND_SHIFT)
 
#define FE_TOWARDZERO   (0x01 << _ROUND_SHIFT)
 
#define FE_DOWNWARD   (0x02 << _ROUND_SHIFT)
 
#define FE_UPWARD   (0x03 << _ROUND_SHIFT)
 
#define _ROUND_MASK
 
#define FE_DFL_ENV   (&__fe_dfl_env)
 
#define __rfs(__fcsr)   __asm __volatile("csrr %0, fcsr" : "=r" (__fcsr))
 
#define __wfs(__fcsr)   __asm __volatile("csrw fcsr, %0" :: "r" (__fcsr))
 

Typedefs

typedef __uint64_t fenv_t
 
typedef __uint64_t fexcept_t
 

Functions

__fenv_static int feclearexcept (int __excepts)
 
__fenv_static int fegetexceptflag (fexcept_t *__flagp, int __excepts)
 
__fenv_static int fesetexceptflag (const fexcept_t *__flagp, int __excepts)
 
__fenv_static int feraiseexcept (int __excepts)
 
__fenv_static int fetestexcept (int __excepts)
 
__fenv_static int fegetround (void)
 
__fenv_static int fesetround (int __round)
 
__fenv_static int fegetenv (fenv_t *__envp)
 
__fenv_static int feholdexcept (fenv_t *__envp)
 
__fenv_static int fesetenv (const fenv_t *__envp)
 
__fenv_static int feupdateenv (const fenv_t *__envp)
 

Variables

__BEGIN_DECLS const fenv_t __fe_dfl_env
 

Macro Definition Documentation

◆ __fenv_static

#define __fenv_static   static

◆ __rfs

#define __rfs (   __fcsr)    __asm __volatile("csrr %0, fcsr" : "=r" (__fcsr))

◆ __wfs

#define __wfs (   __fcsr)    __asm __volatile("csrw fcsr, %0" :: "r" (__fcsr))

◆ _ROUND_MASK

#define _ROUND_MASK
Value:
FE_UPWARD | FE_TOWARDZERO)
#define FE_TONEAREST
Definition: openlibm_fenv_riscv.h:64
#define FE_DOWNWARD
Definition: openlibm_fenv_riscv.h:66
#define FE_TOWARDZERO
Definition: openlibm_fenv_riscv.h:65

◆ _ROUND_SHIFT

#define _ROUND_SHIFT   5

◆ FE_ALL_EXCEPT

#define FE_ALL_EXCEPT
Value:
FE_INVALID | FE_OVERFLOW | FE_UNDERFLOW)
#define FE_UNDERFLOW
Definition: openlibm_fenv_riscv.h:55
#define FE_INEXACT
Definition: openlibm_fenv_riscv.h:56
#define FE_DIVBYZERO
Definition: openlibm_fenv_riscv.h:53
#define FE_OVERFLOW
Definition: openlibm_fenv_riscv.h:54

◆ FE_DFL_ENV

#define FE_DFL_ENV   (&__fe_dfl_env)

◆ FE_DIVBYZERO

#define FE_DIVBYZERO   0x0008

◆ FE_DOWNWARD

#define FE_DOWNWARD   (0x02 << _ROUND_SHIFT)

◆ FE_INEXACT

#define FE_INEXACT   0x0001

◆ FE_INVALID

#define FE_INVALID   0x0010

◆ FE_OVERFLOW

#define FE_OVERFLOW   0x0004

◆ FE_TONEAREST

#define FE_TONEAREST   (0x00 << _ROUND_SHIFT)

◆ FE_TOWARDZERO

#define FE_TOWARDZERO   (0x01 << _ROUND_SHIFT)

◆ FE_UNDERFLOW

#define FE_UNDERFLOW   0x0002

◆ FE_UPWARD

#define FE_UPWARD   (0x03 << _ROUND_SHIFT)

Typedef Documentation

◆ fenv_t

typedef __uint64_t fenv_t

◆ fexcept_t

typedef __uint64_t fexcept_t

Function Documentation

◆ feclearexcept()

__fenv_static int feclearexcept ( int  __excepts)
inline

◆ fegetenv()

__fenv_static int fegetenv ( fenv_t __envp)
inline

◆ fegetexceptflag()

__fenv_static int fegetexceptflag ( fexcept_t __flagp,
int  __excepts 
)
inline

◆ fegetround()

__fenv_static int fegetround ( void  )
inline

◆ feholdexcept()

__fenv_static int feholdexcept ( fenv_t __envp)
inline

◆ feraiseexcept()

__fenv_static int feraiseexcept ( int  __excepts)
inline

◆ fesetenv()

__fenv_static int fesetenv ( const fenv_t __envp)
inline

◆ fesetexceptflag()

__fenv_static int fesetexceptflag ( const fexcept_t __flagp,
int  __excepts 
)
inline

◆ fesetround()

__fenv_static int fesetround ( int  __round)
inline

◆ fetestexcept()

__fenv_static int fetestexcept ( int  __excepts)
inline

◆ feupdateenv()

__fenv_static int feupdateenv ( const fenv_t __envp)
inline

Variable Documentation

◆ __fe_dfl_env

__BEGIN_DECLS const fenv_t __fe_dfl_env
extern