OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 case FLOOR_W_D: // Round double to word towards negative infinity. | 1698 case FLOOR_W_D: // Round double to word towards negative infinity. |
1699 { | 1699 { |
1700 double rounded = floor(fs); | 1700 double rounded = floor(fs); |
1701 int32_t result = static_cast<int32_t>(rounded); | 1701 int32_t result = static_cast<int32_t>(rounded); |
1702 set_fpu_register(fd_reg, result); | 1702 set_fpu_register(fd_reg, result); |
1703 if (set_fcsr_round_error(fs, rounded)) { | 1703 if (set_fcsr_round_error(fs, rounded)) { |
1704 set_fpu_register(fd_reg, kFPUInvalidResult); | 1704 set_fpu_register(fd_reg, kFPUInvalidResult); |
1705 } | 1705 } |
1706 } | 1706 } |
1707 break; | 1707 break; |
1708 case CEIL_W_D: // Round double to word towards positive infinity. | 1708 case CEIL_W_D: // Round double to word towards positive infinity. |
1709 { | 1709 { |
1710 double rounded = ceil(fs); | 1710 double rounded = ceil(fs); |
1711 int32_t result = static_cast<int32_t>(rounded); | 1711 int32_t result = static_cast<int32_t>(rounded); |
1712 set_fpu_register(fd_reg, result); | 1712 set_fpu_register(fd_reg, result); |
1713 if (set_fcsr_round_error(fs, rounded)) { | 1713 if (set_fcsr_round_error(fs, rounded)) { |
1714 set_fpu_register(fd_reg, kFPUInvalidResult); | 1714 set_fpu_register(fd_reg, kFPUInvalidResult); |
1715 } | 1715 } |
1716 } | 1716 } |
1717 break; | 1717 break; |
1718 case CVT_S_D: // Convert double to float (single). | 1718 case CVT_S_D: // Convert double to float (single). |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2429 } | 2429 } |
2430 | 2430 |
2431 | 2431 |
2432 #undef UNSUPPORTED | 2432 #undef UNSUPPORTED |
2433 | 2433 |
2434 } } // namespace v8::internal | 2434 } } // namespace v8::internal |
2435 | 2435 |
2436 #endif // USE_SIMULATOR | 2436 #endif // USE_SIMULATOR |
2437 | 2437 |
2438 #endif // V8_TARGET_ARCH_MIPS | 2438 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |