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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 | 664 |
665 | 665 |
666 #if V8_TARGET_ARCH_PPC64 | 666 #if V8_TARGET_ARCH_PPC64 |
667 void MacroAssembler::ConvertInt64ToDouble(Register src, | 667 void MacroAssembler::ConvertInt64ToDouble(Register src, |
668 DoubleRegister double_dst) { | 668 DoubleRegister double_dst) { |
669 MovInt64ToDouble(double_dst, src); | 669 MovInt64ToDouble(double_dst, src); |
670 fcfid(double_dst, double_dst); | 670 fcfid(double_dst, double_dst); |
671 } | 671 } |
672 | 672 |
673 | 673 |
| 674 void MacroAssembler::ConvertUnsignedInt64ToFloat(Register src, |
| 675 DoubleRegister double_dst) { |
| 676 MovInt64ToDouble(double_dst, src); |
| 677 fcfidus(double_dst, double_dst); |
| 678 } |
| 679 |
| 680 |
674 void MacroAssembler::ConvertUnsignedInt64ToDouble(Register src, | 681 void MacroAssembler::ConvertUnsignedInt64ToDouble(Register src, |
675 DoubleRegister double_dst) { | 682 DoubleRegister double_dst) { |
676 MovInt64ToDouble(double_dst, src); | 683 MovInt64ToDouble(double_dst, src); |
677 fcfidu(double_dst, double_dst); | 684 fcfidu(double_dst, double_dst); |
678 } | 685 } |
679 | 686 |
680 | 687 |
681 void MacroAssembler::ConvertInt64ToFloat(Register src, | 688 void MacroAssembler::ConvertInt64ToFloat(Register src, |
682 DoubleRegister double_dst) { | 689 DoubleRegister double_dst) { |
683 MovInt64ToDouble(double_dst, src); | 690 MovInt64ToDouble(double_dst, src); |
(...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4414 } | 4421 } |
4415 if (mag.shift > 0) srawi(result, result, mag.shift); | 4422 if (mag.shift > 0) srawi(result, result, mag.shift); |
4416 ExtractBit(r0, dividend, 31); | 4423 ExtractBit(r0, dividend, 31); |
4417 add(result, result, r0); | 4424 add(result, result, r0); |
4418 } | 4425 } |
4419 | 4426 |
4420 } // namespace internal | 4427 } // namespace internal |
4421 } // namespace v8 | 4428 } // namespace v8 |
4422 | 4429 |
4423 #endif // V8_TARGET_ARCH_PPC | 4430 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |