• Home
  • Raw
  • Download

Lines Matching refs:rounded

1175 bool Simulator::set_fcsr_round_error(double original, double rounded) {  in set_fcsr_round_error()  argument
1180 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round_error()
1185 if (original != rounded) { in set_fcsr_round_error()
1189 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) { in set_fcsr_round_error()
1194 if (rounded > max_int32 || rounded < min_int32) { in set_fcsr_round_error()
1207 bool Simulator::set_fcsr_round64_error(double original, double rounded) { in set_fcsr_round64_error() argument
1214 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round64_error()
1219 if (original != rounded) { in set_fcsr_round64_error()
1223 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) { in set_fcsr_round64_error()
1228 if (rounded >= max_int64 || rounded < min_int64) { in set_fcsr_round64_error()
1241 bool Simulator::set_fcsr_round_error(float original, float rounded) { in set_fcsr_round_error() argument
1246 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round_error()
1251 if (original != rounded) { in set_fcsr_round_error()
1255 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) { in set_fcsr_round_error()
1260 if (rounded > max_int32 || rounded < min_int32) { in set_fcsr_round_error()
1271 float rounded) { in set_fpu_register_word_invalid_result() argument
1277 } else if (rounded > max_int32) { in set_fpu_register_word_invalid_result()
1279 } else if (rounded < min_int32) { in set_fpu_register_word_invalid_result()
1290 void Simulator::set_fpu_register_invalid_result(float original, float rounded) { in set_fpu_register_invalid_result() argument
1296 } else if (rounded > max_int32) { in set_fpu_register_invalid_result()
1298 } else if (rounded < min_int32) { in set_fpu_register_invalid_result()
1310 float rounded) { in set_fpu_register_invalid_result64() argument
1318 } else if (rounded >= max_int64) { in set_fpu_register_invalid_result64()
1320 } else if (rounded < min_int64) { in set_fpu_register_invalid_result64()
1332 double rounded) { in set_fpu_register_word_invalid_result() argument
1338 } else if (rounded > max_int32) { in set_fpu_register_word_invalid_result()
1340 } else if (rounded < min_int32) { in set_fpu_register_word_invalid_result()
1352 double rounded) { in set_fpu_register_invalid_result() argument
1358 } else if (rounded > max_int32) { in set_fpu_register_invalid_result()
1360 } else if (rounded < min_int32) { in set_fpu_register_invalid_result()
1372 double rounded) { in set_fpu_register_invalid_result64() argument
1380 } else if (rounded >= max_int64) { in set_fpu_register_invalid_result64()
1382 } else if (rounded < min_int64) { in set_fpu_register_invalid_result64()
1395 bool Simulator::set_fcsr_round64_error(float original, float rounded) { in set_fcsr_round64_error() argument
1402 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round64_error()
1407 if (original != rounded) { in set_fcsr_round64_error()
1411 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) { in set_fcsr_round64_error()
1416 if (rounded >= max_int64 || rounded < min_int64) { in set_fcsr_round64_error()
1428 void Simulator::round_according_to_fcsr(double toRound, double& rounded, in round_according_to_fcsr() argument
1445 rounded = std::floor(fs + 0.5); in round_according_to_fcsr()
1446 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1454 rounded = trunc(fs); in round_according_to_fcsr()
1455 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1458 rounded = std::ceil(fs); in round_according_to_fcsr()
1459 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1462 rounded = std::floor(fs); in round_according_to_fcsr()
1463 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1469 void Simulator::round64_according_to_fcsr(double toRound, double& rounded, in round64_according_to_fcsr() argument
1486 rounded = std::floor(fs + 0.5); in round64_according_to_fcsr()
1487 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1495 rounded = trunc(fs); in round64_according_to_fcsr()
1496 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1499 rounded = std::ceil(fs); in round64_according_to_fcsr()
1500 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1503 rounded = std::floor(fs); in round64_according_to_fcsr()
1504 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1511 void Simulator::round_according_to_fcsr(float toRound, float& rounded, in round_according_to_fcsr() argument
1528 rounded = std::floor(fs + 0.5); in round_according_to_fcsr()
1529 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1537 rounded = trunc(fs); in round_according_to_fcsr()
1538 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1541 rounded = std::ceil(fs); in round_according_to_fcsr()
1542 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1545 rounded = std::floor(fs); in round_according_to_fcsr()
1546 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1552 void Simulator::round64_according_to_fcsr(float toRound, float& rounded, in round64_according_to_fcsr() argument
1569 rounded = std::floor(fs + 0.5); in round64_according_to_fcsr()
1570 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1578 rounded = trunc(fs); in round64_according_to_fcsr()
1579 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1582 rounded = std::ceil(fs); in round64_according_to_fcsr()
1583 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1586 rounded = std::floor(fs); in round64_according_to_fcsr()
1587 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
2699 float rounded; in DecodeTypeRegisterSRsType() local
2701 round64_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterSRsType()
2703 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2704 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
2709 float rounded; in DecodeTypeRegisterSRsType() local
2711 round_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterSRsType()
2713 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2714 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
2719 float rounded = trunc(fs); in DecodeTypeRegisterSRsType() local
2720 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
2722 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2723 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
2727 float rounded = trunc(fs); in DecodeTypeRegisterSRsType() local
2728 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
2730 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2731 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
2736 float rounded = std::floor(fs + 0.5); in DecodeTypeRegisterSRsType() local
2737 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
2744 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2745 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
2750 float rounded = std::floor(fs + 0.5); in DecodeTypeRegisterSRsType() local
2751 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
2759 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2760 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
2765 float rounded = floor(fs); in DecodeTypeRegisterSRsType() local
2766 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
2768 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2769 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
2775 float rounded = std::floor(fs); in DecodeTypeRegisterSRsType() local
2776 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
2778 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2779 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
2784 float rounded = std::ceil(fs); in DecodeTypeRegisterSRsType() local
2785 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
2787 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2788 set_fpu_register_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
2792 float rounded = ceil(fs); in DecodeTypeRegisterSRsType() local
2793 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
2795 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
2796 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
3060 double rounded; in DecodeTypeRegisterDRsType() local
3062 round_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterDRsType()
3064 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3065 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
3071 double rounded = std::floor(fs + 0.5); in DecodeTypeRegisterDRsType() local
3072 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
3079 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3080 set_fpu_register_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
3085 double rounded = trunc(fs); in DecodeTypeRegisterDRsType() local
3086 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
3088 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3089 set_fpu_register_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
3094 double rounded = std::floor(fs); in DecodeTypeRegisterDRsType() local
3095 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
3097 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3098 set_fpu_register_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
3103 double rounded = std::ceil(fs); in DecodeTypeRegisterDRsType() local
3104 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
3106 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3107 set_fpu_register_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
3114 double rounded; in DecodeTypeRegisterDRsType() local
3116 round64_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterDRsType()
3118 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3119 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
3124 double rounded = std::floor(fs + 0.5); in DecodeTypeRegisterDRsType() local
3125 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
3133 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3134 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
3139 double rounded = trunc(fs); in DecodeTypeRegisterDRsType() local
3140 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
3142 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3143 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
3148 double rounded = floor(fs); in DecodeTypeRegisterDRsType() local
3149 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
3151 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3152 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
3157 double rounded = ceil(fs); in DecodeTypeRegisterDRsType() local
3158 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
3160 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
3161 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()