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::ConvertUnsignedInt64ToDouble(Register src, |
| 675 DoubleRegister double_dst) { |
| 676 MovInt64ToDouble(double_dst, src); |
| 677 fcfidu(double_dst, double_dst); |
| 678 } |
| 679 |
| 680 |
674 void MacroAssembler::ConvertInt64ToFloat(Register src, | 681 void MacroAssembler::ConvertInt64ToFloat(Register src, |
675 DoubleRegister double_dst) { | 682 DoubleRegister double_dst) { |
676 MovInt64ToDouble(double_dst, src); | 683 MovInt64ToDouble(double_dst, src); |
677 fcfids(double_dst, double_dst); | 684 fcfids(double_dst, double_dst); |
678 } | 685 } |
679 #endif | 686 #endif |
680 | 687 |
681 | 688 |
682 void MacroAssembler::ConvertDoubleToInt64(const DoubleRegister double_input, | 689 void MacroAssembler::ConvertDoubleToInt64(const DoubleRegister double_input, |
683 #if !V8_TARGET_ARCH_PPC64 | 690 #if !V8_TARGET_ARCH_PPC64 |
(...skipping 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4407 } | 4414 } |
4408 if (mag.shift > 0) srawi(result, result, mag.shift); | 4415 if (mag.shift > 0) srawi(result, result, mag.shift); |
4409 ExtractBit(r0, dividend, 31); | 4416 ExtractBit(r0, dividend, 31); |
4410 add(result, result, r0); | 4417 add(result, result, r0); |
4411 } | 4418 } |
4412 | 4419 |
4413 } // namespace internal | 4420 } // namespace internal |
4414 } // namespace v8 | 4421 } // namespace v8 |
4415 | 4422 |
4416 #endif // V8_TARGET_ARCH_PPC | 4423 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |