OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 add_d(fd, fd, fd); // In delay slot. | 1645 add_d(fd, fd, fd); // In delay slot. |
1646 | 1646 |
1647 bind(&msb_clear); | 1647 bind(&msb_clear); |
1648 // Rs < 2^63, we can do simple conversion. | 1648 // Rs < 2^63, we can do simple conversion. |
1649 dmtc1(rs, fd); | 1649 dmtc1(rs, fd); |
1650 cvt_d_l(fd, fd); | 1650 cvt_d_l(fd, fd); |
1651 | 1651 |
1652 bind(&conversion_done); | 1652 bind(&conversion_done); |
1653 } | 1653 } |
1654 | 1654 |
| 1655 void MacroAssembler::Cvt_s_uw(FPURegister fd, FPURegister fs) { |
| 1656 // Move the data from fs to t8. |
| 1657 mfc1(t8, fs); |
| 1658 Cvt_s_uw(fd, t8); |
| 1659 } |
| 1660 |
| 1661 void MacroAssembler::Cvt_s_uw(FPURegister fd, Register rs) { |
| 1662 // Convert rs to a FP value in fd. |
| 1663 DCHECK(!rs.is(t9)); |
| 1664 DCHECK(!rs.is(at)); |
| 1665 |
| 1666 // Zero extend int32 in rs. |
| 1667 Dext(t9, rs, 0, 32); |
| 1668 dmtc1(t9, fd); |
| 1669 cvt_s_l(fd, fd); |
| 1670 } |
1655 | 1671 |
1656 void MacroAssembler::Cvt_s_ul(FPURegister fd, FPURegister fs) { | 1672 void MacroAssembler::Cvt_s_ul(FPURegister fd, FPURegister fs) { |
1657 // Move the data from fs to t8. | 1673 // Move the data from fs to t8. |
1658 dmfc1(t8, fs); | 1674 dmfc1(t8, fs); |
1659 Cvt_s_ul(fd, t8); | 1675 Cvt_s_ul(fd, t8); |
1660 } | 1676 } |
1661 | 1677 |
1662 | 1678 |
1663 void MacroAssembler::Cvt_s_ul(FPURegister fd, Register rs) { | 1679 void MacroAssembler::Cvt_s_ul(FPURegister fd, Register rs) { |
1664 // Convert rs to a FP value in fd. | 1680 // Convert rs to a FP value in fd. |
(...skipping 4917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6582 if (mag.shift > 0) sra(result, result, mag.shift); | 6598 if (mag.shift > 0) sra(result, result, mag.shift); |
6583 srl(at, dividend, 31); | 6599 srl(at, dividend, 31); |
6584 Addu(result, result, Operand(at)); | 6600 Addu(result, result, Operand(at)); |
6585 } | 6601 } |
6586 | 6602 |
6587 | 6603 |
6588 } // namespace internal | 6604 } // namespace internal |
6589 } // namespace v8 | 6605 } // namespace v8 |
6590 | 6606 |
6591 #endif // V8_TARGET_ARCH_MIPS64 | 6607 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |