FLOAT_OP(roundl, d)
{
set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
- DT2 = float64_round_to_int(FDT0, &env->fp_status);
- DT2 = float64_to_int64(DT2, &env->fp_status);
+ DT2 = float64_to_int64(FDT0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(roundl, s)
{
set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
- WT2 = float32_round_to_int(FST0, &env->fp_status);
- DT2 = float32_to_int64(WT2, &env->fp_status);
+ DT2 = float32_to_int64(FST0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(roundw, d)
{
set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
- DT2 = float64_round_to_int(FDT0, &env->fp_status);
-// ???
- env->fp_status.float_exception_flags &= ~float_flag_inexact;
- WT2 = float64_to_int32(DT2, &env->fp_status);
+ WT2 = float64_to_int32(FDT0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(roundw, s)
{
set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
- WT2 = float32_round_to_int(FST0, &env->fp_status);
- WT2 = float32_to_int32(WT2, &env->fp_status);
+ WT2 = float32_to_int32(FST0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(ceill, d)
{
set_float_rounding_mode(float_round_up, &env->fp_status);
- DT2 = float64_round_to_int(FDT0, &env->fp_status);
- DT2 = float64_to_int64(DT2, &env->fp_status);
+ DT2 = float64_to_int64(FDT0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(ceill, s)
{
set_float_rounding_mode(float_round_up, &env->fp_status);
- WT2 = float32_round_to_int(FST0, &env->fp_status);
- DT2 = float32_to_int64(WT2, &env->fp_status);
+ DT2 = float32_to_int64(FST0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(ceilw, d)
{
set_float_rounding_mode(float_round_up, &env->fp_status);
- DT2 = float64_round_to_int(FDT0, &env->fp_status);
-// ???
- env->fp_status.float_exception_flags &= ~float_flag_inexact;
- WT2 = float64_to_int32(DT2, &env->fp_status);
+ WT2 = float64_to_int32(FDT0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(ceilw, s)
{
set_float_rounding_mode(float_round_up, &env->fp_status);
- WT2 = float32_round_to_int(FST0, &env->fp_status);
- WT2 = float32_to_int32(WT2, &env->fp_status);
+ WT2 = float32_to_int32(FST0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(floorl, d)
{
set_float_rounding_mode(float_round_down, &env->fp_status);
- DT2 = float64_round_to_int(FDT0, &env->fp_status);
- DT2 = float64_to_int64(DT2, &env->fp_status);
+ DT2 = float64_to_int64(FDT0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(floorl, s)
{
set_float_rounding_mode(float_round_down, &env->fp_status);
- WT2 = float32_round_to_int(FST0, &env->fp_status);
- DT2 = float32_to_int64(WT2, &env->fp_status);
+ DT2 = float32_to_int64(FST0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(floorw, d)
{
set_float_rounding_mode(float_round_down, &env->fp_status);
- DT2 = float64_round_to_int(FDT0, &env->fp_status);
-// ???
- env->fp_status.float_exception_flags &= ~float_flag_inexact;
- WT2 = float64_to_int32(DT2, &env->fp_status);
+ WT2 = float64_to_int32(FDT0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))
FLOAT_OP(floorw, s)
{
set_float_rounding_mode(float_round_down, &env->fp_status);
- WT2 = float32_round_to_int(FST0, &env->fp_status);
- WT2 = float32_to_int32(WT2, &env->fp_status);
+ WT2 = float32_to_int32(FST0, &env->fp_status);
RESTORE_ROUNDING_MODE;
update_fcr31();
if (GET_FP_CAUSE(env->fcr31) & (FP_OVERFLOW | FP_INVALID))