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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 ResetRoundingMode(); | 708 ResetRoundingMode(); |
709 } | 709 } |
710 | 710 |
711 MovDoubleToInt64( | 711 MovDoubleToInt64( |
712 #if !V8_TARGET_ARCH_PPC64 | 712 #if !V8_TARGET_ARCH_PPC64 |
713 dst_hi, | 713 dst_hi, |
714 #endif | 714 #endif |
715 dst, double_dst); | 715 dst, double_dst); |
716 } | 716 } |
717 | 717 |
| 718 #if V8_TARGET_ARCH_PPC64 |
| 719 void MacroAssembler::ConvertDoubleToUnsignedInt64( |
| 720 const DoubleRegister double_input, const Register dst, |
| 721 const DoubleRegister double_dst, FPRoundingMode rounding_mode) { |
| 722 if (rounding_mode == kRoundToZero) { |
| 723 fctiduz(double_dst, double_input); |
| 724 } else { |
| 725 SetRoundingMode(rounding_mode); |
| 726 fctidu(double_dst, double_input); |
| 727 ResetRoundingMode(); |
| 728 } |
| 729 |
| 730 MovDoubleToInt64(dst, double_dst); |
| 731 } |
| 732 #endif |
| 733 |
718 | 734 |
719 void MacroAssembler::LoadConstantPoolPointerRegisterFromCodeTargetAddress( | 735 void MacroAssembler::LoadConstantPoolPointerRegisterFromCodeTargetAddress( |
720 Register code_target_address) { | 736 Register code_target_address) { |
721 lwz(kConstantPoolRegister, | 737 lwz(kConstantPoolRegister, |
722 MemOperand(code_target_address, | 738 MemOperand(code_target_address, |
723 Code::kConstantPoolOffset - Code::kHeaderSize)); | 739 Code::kConstantPoolOffset - Code::kHeaderSize)); |
724 add(kConstantPoolRegister, kConstantPoolRegister, code_target_address); | 740 add(kConstantPoolRegister, kConstantPoolRegister, code_target_address); |
725 } | 741 } |
726 | 742 |
727 | 743 |
(...skipping 3684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4412 } | 4428 } |
4413 if (mag.shift > 0) srawi(result, result, mag.shift); | 4429 if (mag.shift > 0) srawi(result, result, mag.shift); |
4414 ExtractBit(r0, dividend, 31); | 4430 ExtractBit(r0, dividend, 31); |
4415 add(result, result, r0); | 4431 add(result, result, r0); |
4416 } | 4432 } |
4417 | 4433 |
4418 } // namespace internal | 4434 } // namespace internal |
4419 } // namespace v8 | 4435 } // namespace v8 |
4420 | 4436 |
4421 #endif // V8_TARGET_ARCH_PPC | 4437 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |