Lines Matching refs:rounded
1247 float rounded) { in set_fpu_register_word_invalid_result() argument
1253 } else if (rounded > max_int32) { in set_fpu_register_word_invalid_result()
1255 } else if (rounded < min_int32) { in set_fpu_register_word_invalid_result()
1266 void Simulator::set_fpu_register_invalid_result(float original, float rounded) { in set_fpu_register_invalid_result() argument
1272 } else if (rounded > max_int32) { in set_fpu_register_invalid_result()
1274 } else if (rounded < min_int32) { in set_fpu_register_invalid_result()
1286 float rounded) { in set_fpu_register_invalid_result64() argument
1294 } else if (rounded >= max_int64) { in set_fpu_register_invalid_result64()
1296 } else if (rounded < min_int64) { in set_fpu_register_invalid_result64()
1308 double rounded) { in set_fpu_register_word_invalid_result() argument
1314 } else if (rounded > max_int32) { in set_fpu_register_word_invalid_result()
1316 } else if (rounded < min_int32) { in set_fpu_register_word_invalid_result()
1328 double rounded) { in set_fpu_register_invalid_result() argument
1334 } else if (rounded > max_int32) { in set_fpu_register_invalid_result()
1336 } else if (rounded < min_int32) { in set_fpu_register_invalid_result()
1348 double rounded) { in set_fpu_register_invalid_result64() argument
1356 } else if (rounded >= max_int64) { in set_fpu_register_invalid_result64()
1358 } else if (rounded < min_int64) { in set_fpu_register_invalid_result64()
1371 bool Simulator::set_fcsr_round_error(double original, double rounded) { in set_fcsr_round_error() argument
1376 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round_error()
1381 if (original != rounded) { in set_fcsr_round_error()
1385 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) { in set_fcsr_round_error()
1390 if (rounded > max_int32 || rounded < min_int32) { in set_fcsr_round_error()
1403 bool Simulator::set_fcsr_round64_error(double original, double rounded) { in set_fcsr_round64_error() argument
1410 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round64_error()
1415 if (original != rounded) { in set_fcsr_round64_error()
1419 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) { in set_fcsr_round64_error()
1424 if (rounded >= max_int64 || rounded < min_int64) { in set_fcsr_round64_error()
1437 bool Simulator::set_fcsr_round_error(float original, float rounded) { in set_fcsr_round_error() argument
1442 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round_error()
1447 if (original != rounded) { in set_fcsr_round_error()
1451 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) { in set_fcsr_round_error()
1456 if (rounded > max_int32 || rounded < min_int32) { in set_fcsr_round_error()
1469 bool Simulator::set_fcsr_round64_error(float original, float rounded) { in set_fcsr_round64_error() argument
1476 if (!std::isfinite(original) || !std::isfinite(rounded)) { in set_fcsr_round64_error()
1481 if (original != rounded) { in set_fcsr_round64_error()
1485 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) { in set_fcsr_round64_error()
1490 if (rounded >= max_int64 || rounded < min_int64) { in set_fcsr_round64_error()
1501 void Simulator::round_according_to_fcsr(double toRound, double& rounded, in round_according_to_fcsr() argument
1518 rounded = std::floor(fs + 0.5); in round_according_to_fcsr()
1519 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1527 rounded = trunc(fs); in round_according_to_fcsr()
1528 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1531 rounded = std::ceil(fs); in round_according_to_fcsr()
1532 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1535 rounded = std::floor(fs); in round_according_to_fcsr()
1536 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1542 void Simulator::round_according_to_fcsr(float toRound, float& rounded, in round_according_to_fcsr() argument
1559 rounded = std::floor(fs + 0.5); in round_according_to_fcsr()
1560 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1568 rounded = trunc(fs); in round_according_to_fcsr()
1569 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1572 rounded = std::ceil(fs); in round_according_to_fcsr()
1573 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1576 rounded = std::floor(fs); in round_according_to_fcsr()
1577 rounded_int = static_cast<int32_t>(rounded); in round_according_to_fcsr()
1583 void Simulator::round64_according_to_fcsr(double toRound, double& rounded, in round64_according_to_fcsr() argument
1600 rounded = std::floor(fs + 0.5); in round64_according_to_fcsr()
1601 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1609 rounded = trunc(fs); in round64_according_to_fcsr()
1610 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1613 rounded = std::ceil(fs); in round64_according_to_fcsr()
1614 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1617 rounded = std::floor(fs); in round64_according_to_fcsr()
1618 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1624 void Simulator::round64_according_to_fcsr(float toRound, float& rounded, in round64_according_to_fcsr() argument
1641 rounded = std::floor(fs + 0.5); in round64_according_to_fcsr()
1642 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1650 rounded = trunc(fs); in round64_according_to_fcsr()
1651 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1654 rounded = std::ceil(fs); in round64_according_to_fcsr()
1655 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
1658 rounded = std::floor(fs); in round64_according_to_fcsr()
1659 rounded_int = static_cast<int64_t>(rounded); in round64_according_to_fcsr()
2608 double rounded; in DecodeTypeRegisterDRsType() local
2610 round_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterDRsType()
2612 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2613 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
2618 double rounded = std::floor(fs + 0.5); in DecodeTypeRegisterDRsType() local
2619 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
2626 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2627 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
2632 double rounded = trunc(fs); in DecodeTypeRegisterDRsType() local
2633 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
2635 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2636 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
2641 double rounded = std::floor(fs); in DecodeTypeRegisterDRsType() local
2642 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
2644 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2645 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
2650 double rounded = std::ceil(fs); in DecodeTypeRegisterDRsType() local
2651 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterDRsType()
2653 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2654 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterDRsType()
2663 double rounded; in DecodeTypeRegisterDRsType() local
2664 round64_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterDRsType()
2666 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2667 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
2677 double rounded = trunc(fs); in DecodeTypeRegisterDRsType() local
2678 i64 = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
2681 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2682 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
2691 double rounded = std::floor(fs + 0.5); in DecodeTypeRegisterDRsType() local
2692 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
2701 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2702 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
2711 double rounded = std::floor(fs); in DecodeTypeRegisterDRsType() local
2712 int64_t i64 = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
2715 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2716 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
2725 double rounded = std::ceil(fs); in DecodeTypeRegisterDRsType() local
2726 int64_t i64 = static_cast<int64_t>(rounded); in DecodeTypeRegisterDRsType()
2729 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterDRsType()
2730 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterDRsType()
3151 float rounded = trunc(fs); in DecodeTypeRegisterSRsType() local
3152 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
3154 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3155 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
3160 float rounded = trunc(fs); in DecodeTypeRegisterSRsType() local
3161 int64_t i64 = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
3164 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3165 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
3174 float rounded = std::floor(fs); in DecodeTypeRegisterSRsType() local
3175 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
3177 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3178 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
3183 float rounded = std::floor(fs); in DecodeTypeRegisterSRsType() local
3184 int64_t i64 = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
3187 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3188 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
3196 float rounded = std::floor(fs + 0.5); in DecodeTypeRegisterSRsType() local
3197 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
3204 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3205 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
3211 float rounded = std::floor(fs + 0.5); in DecodeTypeRegisterSRsType() local
3212 int64_t result = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
3221 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3222 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
3231 float rounded = std::ceil(fs); in DecodeTypeRegisterSRsType() local
3232 int32_t result = static_cast<int32_t>(rounded); in DecodeTypeRegisterSRsType()
3234 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3235 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()
3240 float rounded = std::ceil(fs); in DecodeTypeRegisterSRsType() local
3241 int64_t i64 = static_cast<int64_t>(rounded); in DecodeTypeRegisterSRsType()
3244 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3245 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
3271 float rounded; in DecodeTypeRegisterSRsType() local
3272 round64_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterSRsType()
3274 if (set_fcsr_round64_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3275 set_fpu_register_invalid_result64(fs, rounded); in DecodeTypeRegisterSRsType()
3283 float rounded; in DecodeTypeRegisterSRsType() local
3285 round_according_to_fcsr(fs, rounded, result, fs); in DecodeTypeRegisterSRsType()
3287 if (set_fcsr_round_error(fs, rounded)) { in DecodeTypeRegisterSRsType()
3288 set_fpu_register_word_invalid_result(fs, rounded); in DecodeTypeRegisterSRsType()