Imt.Base C++ API V4.1.1.0
Loading...
Searching...
No Matches
openlibm_fenv_riscv.h File Reference
#include <stdint.h>
#include "../inc/cdefs-compat.h"

Go to the source code of this file.

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

Definition at line 45 of file openlibm_fenv_riscv.h.

◆ __rfs

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

Definition at line 86 of file openlibm_fenv_riscv.h.

◆ __wfs

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

Definition at line 87 of file openlibm_fenv_riscv.h.

◆ _ROUND_MASK

#define _ROUND_MASK
Value:
#define FE_UPWARD
#define FE_TONEAREST
#define FE_DOWNWARD
#define FE_TOWARDZERO

Definition at line 68 of file openlibm_fenv_riscv.h.

◆ _ROUND_SHIFT

#define _ROUND_SHIFT   5

Definition at line 63 of file openlibm_fenv_riscv.h.

◆ FE_ALL_EXCEPT

#define FE_ALL_EXCEPT
Value:
#define FE_UNDERFLOW
#define FE_INVALID
#define FE_INEXACT
#define FE_DIVBYZERO
#define FE_OVERFLOW

Definition at line 57 of file openlibm_fenv_riscv.h.

◆ FE_DFL_ENV

#define FE_DFL_ENV   (&__fe_dfl_env)

Definition at line 75 of file openlibm_fenv_riscv.h.

◆ FE_DIVBYZERO

#define FE_DIVBYZERO   0x0008

Definition at line 53 of file openlibm_fenv_riscv.h.

◆ FE_DOWNWARD

#define FE_DOWNWARD   (0x02 << _ROUND_SHIFT)

Definition at line 66 of file openlibm_fenv_riscv.h.

◆ FE_INEXACT

#define FE_INEXACT   0x0001

Definition at line 56 of file openlibm_fenv_riscv.h.

◆ FE_INVALID

#define FE_INVALID   0x0010

Definition at line 52 of file openlibm_fenv_riscv.h.

◆ FE_OVERFLOW

#define FE_OVERFLOW   0x0004

Definition at line 54 of file openlibm_fenv_riscv.h.

◆ FE_TONEAREST

#define FE_TONEAREST   (0x00 << _ROUND_SHIFT)

Definition at line 64 of file openlibm_fenv_riscv.h.

◆ FE_TOWARDZERO

#define FE_TOWARDZERO   (0x01 << _ROUND_SHIFT)

Definition at line 65 of file openlibm_fenv_riscv.h.

◆ FE_UNDERFLOW

#define FE_UNDERFLOW   0x0002

Definition at line 55 of file openlibm_fenv_riscv.h.

◆ FE_UPWARD

#define FE_UPWARD   (0x03 << _ROUND_SHIFT)

Definition at line 67 of file openlibm_fenv_riscv.h.

Typedef Documentation

◆ fenv_t

typedef __uint64_t fenv_t

Definition at line 48 of file openlibm_fenv_riscv.h.

◆ fexcept_t

typedef __uint64_t fexcept_t

Definition at line 49 of file openlibm_fenv_riscv.h.

Function Documentation

◆ feclearexcept()

__fenv_static int feclearexcept ( int  __excepts)
inline

Definition at line 104 of file openlibm_fenv_riscv.h.

◆ fegetenv()

__fenv_static int fegetenv ( fenv_t __envp)
inline

Definition at line 181 of file openlibm_fenv_riscv.h.

◆ fegetexceptflag()

__fenv_static int fegetexceptflag ( fexcept_t __flagp,
int  __excepts 
)
inline

Definition at line 113 of file openlibm_fenv_riscv.h.

◆ fegetround()

__fenv_static int fegetround ( void  )
inline

Definition at line 155 of file openlibm_fenv_riscv.h.

◆ feholdexcept()

__fenv_static int feholdexcept ( fenv_t __envp)
inline

Definition at line 190 of file openlibm_fenv_riscv.h.

◆ feraiseexcept()

__fenv_static int feraiseexcept ( int  __excepts)
inline

Definition at line 136 of file openlibm_fenv_riscv.h.

◆ fesetenv()

__fenv_static int fesetenv ( const fenv_t __envp)
inline

Definition at line 199 of file openlibm_fenv_riscv.h.

◆ fesetexceptflag()

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

Definition at line 124 of file openlibm_fenv_riscv.h.

◆ fesetround()

__fenv_static int fesetround ( int  __round)
inline

Definition at line 165 of file openlibm_fenv_riscv.h.

◆ fetestexcept()

__fenv_static int fetestexcept ( int  __excepts)
inline

Definition at line 145 of file openlibm_fenv_riscv.h.

◆ feupdateenv()

__fenv_static int feupdateenv ( const fenv_t __envp)
inline

Definition at line 208 of file openlibm_fenv_riscv.h.

Variable Documentation

◆ __fe_dfl_env

__BEGIN_DECLS const fenv_t __fe_dfl_env
extern