OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 657 |
658 void MacroAssembler::ConvertIntToFloat(const DoubleRegister dst, | 658 void MacroAssembler::ConvertIntToFloat(const DoubleRegister dst, |
659 const Register src, | 659 const Register src, |
660 const Register int_scratch) { | 660 const Register int_scratch) { |
661 MovIntToDouble(dst, src, int_scratch); | 661 MovIntToDouble(dst, src, int_scratch); |
662 fcfid(dst, dst); | 662 fcfid(dst, dst); |
663 frsp(dst, dst); | 663 frsp(dst, dst); |
664 } | 664 } |
665 | 665 |
666 | 666 |
| 667 #if V8_TARGET_ARCH_PPC64 |
| 668 void MacroAssembler::ConvertInt64ToDouble(Register src, |
| 669 DoubleRegister double_dst) { |
| 670 MovInt64ToDouble(double_dst, src); |
| 671 fcfid(double_dst, double_dst); |
| 672 } |
| 673 #endif |
| 674 |
| 675 |
667 void MacroAssembler::ConvertDoubleToInt64(const DoubleRegister double_input, | 676 void MacroAssembler::ConvertDoubleToInt64(const DoubleRegister double_input, |
668 #if !V8_TARGET_ARCH_PPC64 | 677 #if !V8_TARGET_ARCH_PPC64 |
669 const Register dst_hi, | 678 const Register dst_hi, |
670 #endif | 679 #endif |
671 const Register dst, | 680 const Register dst, |
672 const DoubleRegister double_dst, | 681 const DoubleRegister double_dst, |
673 FPRoundingMode rounding_mode) { | 682 FPRoundingMode rounding_mode) { |
674 if (rounding_mode == kRoundToZero) { | 683 if (rounding_mode == kRoundToZero) { |
675 fctidz(double_dst, double_input); | 684 fctidz(double_dst, double_input); |
676 } else { | 685 } else { |
(...skipping 3715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4392 } | 4401 } |
4393 if (mag.shift > 0) srawi(result, result, mag.shift); | 4402 if (mag.shift > 0) srawi(result, result, mag.shift); |
4394 ExtractBit(r0, dividend, 31); | 4403 ExtractBit(r0, dividend, 31); |
4395 add(result, result, r0); | 4404 add(result, result, r0); |
4396 } | 4405 } |
4397 | 4406 |
4398 } // namespace internal | 4407 } // namespace internal |
4399 } // namespace v8 | 4408 } // namespace v8 |
4400 | 4409 |
4401 #endif // V8_TARGET_ARCH_PPC | 4410 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |