macsim/src/arch/riscv.c
// set the RISC-V flags according to the hosts FPU environment
set the RISC-V flags according to the hosts FPU environment
set the RISC - V flags according to the hosts FPU environment
static void update_client_fp_env(node_t *node)
{
    int raised = fetestexcept(FE_ALL_EXCEPT);
    node->core.riscv.fcsr = node->core.riscv.fcsr
        | ((raised&FE_INEXACT)   ? RISCV_FFLAGS_NX : 0)
        | ((raised&FE_DIVBYZERO) ? RISCV_FFLAGS_DZ : 0)
        | ((raised&FE_UNDERFLOW) ? RISCV_FFLAGS_UF : 0)
        | ((raised&FE_OVERFLOW)  ? RISCV_FFLAGS_OF : 0)
        | ((raised&FE_INVALID)   ? RISCV_FFLAGS_NV : 0);
}
static void update_client_fp_env ( node_t * node ) { int raised = fetestexcept ( FE_ALL_EXCEPT ) ; node -> core . riscv . fcsr = node -> core . riscv . fcsr | ( ( raised & FE_INEXACT ) ? RISCV_FFLAGS_NX : 0 ) | ( ( raised & FE_DIVBYZERO ) ? RISCV_FFLAGS_DZ : 0 ) | ( ( raised & FE_UNDERFLOW ) ? RISCV_FFLAGS_UF : 0 ) | ( ( raised & FE_OVERFLOW ) ? RISCV_FFLAGS_OF : 0 ) | ( ( raised & FE_INVALID ) ? RISCV_FFLAGS_NV : 0 ) ; }
set the RISC-V flags according to the hosts FPU environment
set the RISC - V flags according to the hosts FPU environment