Home | History | Annotate | Download | only in mips

Lines Matching refs:rounded

1169                                                      float rounded) {
1175 } else if (rounded > max_int32) {
1177 } else if (rounded < min_int32) {
1188 void Simulator::set_fpu_register_invalid_result(float original, float rounded) {
1194 } else if (rounded > max_int32) {
1196 } else if (rounded < min_int32) {
1208 float rounded) {
1216 } else if (rounded >= max_int64) {
1218 } else if (rounded < min_int64) {
1230 double rounded) {
1236 } else if (rounded > max_int32) {
1238 } else if (rounded < min_int32) {
1250 double rounded) {
1256 } else if (rounded > max_int32) {
1258 } else if (rounded < min_int32) {
1270 double rounded) {
1278 } else if (rounded >= max_int64) {
1280 } else if (rounded < min_int64) {
1293 bool Simulator::set_fcsr_round_error(double original, double rounded) {
1298 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1303 if (original != rounded) {
1307 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1312 if (rounded > max_int32 || rounded < min_int32) {
1325 bool Simulator::set_fcsr_round64_error(double original, double rounded) {
1332 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1337 if (original != rounded) {
1341 if (rounded < DBL_MIN && rounded > -DBL_MIN && rounded != 0) {
1346 if (rounded >= max_int64 || rounded < min_int64) {
1359 bool Simulator::set_fcsr_round_error(float original, float rounded) {
1364 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1369 if (original != rounded) {
1373 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) {
1378 if (rounded > max_int32 || rounded < min_int32) {
1391 bool Simulator::set_fcsr_round64_error(float original, float rounded) {
1398 if (!std::isfinite(original) || !std::isfinite(rounded)) {
1403 if (original != rounded) {
1407 if (rounded < FLT_MIN && rounded > -FLT_MIN && rounded != 0) {
1412 if (rounded >= max_int64 || rounded < min_int64) {
1423 void Simulator::round_according_to_fcsr(double toRound, double& rounded,
1440 rounded = std::floor(fs + 0.5);
1441 rounded_int = static_cast<int32_t>(rounded);
1446 rounded -= 1.;
1450 rounded = trunc(fs);
1451 rounded_int = static_cast<int32_t>(rounded);
1454 rounded = std::ceil(fs);
1455 rounded_int = static_cast<int32_t>(rounded);
1458 rounded = std::floor(fs);
1459 rounded_int = static_cast<int32_t>(rounded);
1465 void Simulator::round_according_to_fcsr(float toRound, float& rounded,
1482 rounded = std::floor(fs + 0.5);
1483 rounded_int = static_cast<int32_t>(rounded);
1488 rounded -= 1.f;
1492 rounded = trunc(fs);
1493 rounded_int = static_cast<int32_t>(rounded);
1496 rounded = std::ceil(fs);
1497 rounded_int = static_cast<int32_t>(rounded);
1500 rounded = std::floor(fs);
1501 rounded_int = static_cast<int32_t>(rounded);
1507 void Simulator::round_according_to_msacsr(T_fp toRound, T_fp& rounded,
1524 rounded = std::floor(toRound + 0.5);
1525 rounded_int = static_cast<T_int>(rounded);
1530 rounded -= 1;
1534 rounded = trunc(toRound);
1535 rounded_int = static_cast<T_int>(rounded);
1538 rounded = std::ceil(toRound);
1539 rounded_int = static_cast<T_int>(rounded);
1542 rounded = std::floor(toRound);
1543 rounded_int = static_cast<T_int>(rounded);
1548 void Simulator::round64_according_to_fcsr(double toRound, double& rounded,
1565 rounded = std::floor(fs + 0.5);
1566 rounded_int = static_cast<int64_t>(rounded);
1571 rounded -= 1.;
1575 rounded = trunc(fs);
1576 rounded_int = static_cast<int64_t>(rounded);
1579 rounded = std::ceil(fs);
1580 rounded_int = static_cast<int64_t>(rounded);
1583 rounded = std::floor(fs);
1584 rounded_int = static_cast<int64_t>(rounded);
1590 void Simulator::round64_according_to_fcsr(float toRound, float& rounded,
1607 rounded = std::floor(fs + 0.5);
1608 rounded_int = static_cast<int64_t>(rounded);
1613 rounded -= 1.f;
1617 rounded = trunc(fs);
1618 rounded_int = static_cast<int64_t>(rounded);
1621 rounded = std::ceil(fs);
1622 rounded_int = static_cast<int64_t>(rounded);
1625 rounded = std::floor(fs);
1626 rounded_int = static_cast<int64_t>(rounded);
2860 double rounded;
2862 round_according_to_fcsr(fs, rounded, result, fs);
2864 if (set_fcsr_round_error(fs, rounded)) {
2865 set_fpu_register_word_invalid_result(fs, rounded);
2870 double rounded = std::floor(fs + 0.5);
2871 int32_t result = static_cast<int32_t>(rounded);
2878 if (set_fcsr_round_error(fs, rounded)) {
2879 set_fpu_register_word_invalid_result(fs, rounded);
2884 double rounded = trunc(fs);
2885 int32_t result = static_cast<int32_t>(rounded);
2887 if (set_fcsr_round_error(fs, rounded)) {
2888 set_fpu_register_word_invalid_result(fs, rounded);
2893 double rounded = std::floor(fs);
2894 int32_t result = static_cast<int32_t>(rounded);
2896 if (set_fcsr_round_error(fs, rounded)) {
2897 set_fpu_register_word_invalid_result(fs, rounded);
2902 double rounded = std::ceil(fs);
2903 int32_t result = static_cast<int32_t>(rounded);
2905 if (set_fcsr_round_error(fs, rounded)) {
2906 set_fpu_register_word_invalid_result(fs, rounded);
2915 double rounded;
2916 round64_according_to_fcsr(fs, rounded, result, fs);
2918 rounded)) {
2919 set_fpu_register_invalid_result64(fs, rounded);
2929 double rounded = trunc(fs);
2930 i64 = static_cast<int64_t>(rounded);
2933 if (set_fcsr_round64_error(fs, rounded)) {
2934 set_fpu_register_invalid_result64(fs, rounded);
2943 double rounded = std::floor(fs + 0.5);
2944 int64_t result = static_cast<int64_t>(rounded);
2953 if (set_fcsr_round64_error(fs, rounded)) {
2954 set_fpu_register_invalid_result64(fs, rounded);
2963 double rounded = std::floor(fs);
2964 int64_t i64 = static_cast<int64_t>(rounded);
2967 if (set_fcsr_round64_error(fs, rounded)) {
2968 set_fpu_register_invalid_result64(fs, rounded);
2977 double rounded = std::ceil(fs);
2978 int64_t i64 = static_cast<int64_t>(rounded);
2981 if (set_fcsr_round64_error(fs, rounded)) {
2982 set_fpu_register_invalid_result64(fs, rounded);
3410 float rounded = trunc(fs);
3411 int32_t result = static_cast<int32_t>(rounded);
3413 if (set_fcsr_round_error(fs, rounded)) {
3414 set_fpu_register_word_invalid_result(fs, rounded);
3419 float rounded = trunc(fs);
3420 int64_t i64 = static_cast<int64_t>(rounded);
3423 if (set_fcsr_round64_error(fs, rounded)) {
3424 set_fpu_register_invalid_result64(fs, rounded);
3433 float rounded = std::floor(fs);
3434 int32_t result = static_cast<int32_t>(rounded);
3436 if (set_fcsr_round_error(fs, rounded)) {
3437 set_fpu_register_word_invalid_result(fs, rounded);
3442 float rounded = std::floor(fs);
3443 int64_t i64 = static_cast<int64_t>(rounded);
3446 if (set_fcsr_round64_error(fs, rounded)) {
3447 set_fpu_register_invalid_result64(fs, rounded);
3455 float rounded = std::floor(fs + 0.5);
3456 int32_t result = static_cast<int32_t>(rounded);
3463 if (set_fcsr_round_error(fs, rounded)) {
3464 set_fpu_register_word_invalid_result(fs, rounded);
3470 float rounded = std::floor(fs + 0.5);
3471 int64_t result = static_cast<int64_t>(rounded);
3480 if (set_fcsr_round64_error(fs, rounded)) {
3481 set_fpu_register_invalid_result64(fs, rounded);
3490 float rounded = std::ceil(fs);
3491 int32_t result = static_cast<int32_t>(rounded);
3493 if (set_fcsr_round_error(fs, rounded)) {
3494 set_fpu_register_word_invalid_result(fs, rounded);
3499 float rounded = std::ceil(fs);
3500 int64_t i64 = static_cast<int64_t>(rounded);
3503 if (set_fcsr_round64_error(fs, rounded)) {
3504 set_fpu_register_invalid_result64(fs, rounded);
3530 float rounded;
3531 round64_according_to_fcsr(fs, rounded, result, fs);
3533 if (set_fcsr_round64_error(fs, rounded)) {
3534 set_fpu_register_invalid_result64(fs, rounded);
3542 float rounded;
3544 round_according_to_fcsr(fs, rounded, result, fs);
3546 if (set_fcsr_round_error(fs, rounded)) {
3547 set_fpu_register_word_invalid_result(fs, rounded);