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 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #if V8_TARGET_ARCH_PPC | 10 #if V8_TARGET_ARCH_PPC |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 // General purpose registers are pushed last on the stack. | 595 // General purpose registers are pushed last on the stack. |
596 int doubles_size = DoubleRegister::NumAllocatableRegisters() * kDoubleSize; | 596 int doubles_size = DoubleRegister::NumAllocatableRegisters() * kDoubleSize; |
597 int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize; | 597 int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize; |
598 return MemOperand(sp, doubles_size + register_offset); | 598 return MemOperand(sp, doubles_size + register_offset); |
599 } | 599 } |
600 | 600 |
601 | 601 |
602 void MacroAssembler::CanonicalizeNaN(const DoubleRegister dst, | 602 void MacroAssembler::CanonicalizeNaN(const DoubleRegister dst, |
603 const DoubleRegister src) { | 603 const DoubleRegister src) { |
604 // Turn potential sNaN into qNaN. | 604 // Turn potential sNaN into qNaN. |
605 fadd(dst, src, kDoubleRegZero); | 605 fsub(dst, src, kDoubleRegZero); |
606 } | 606 } |
607 | 607 |
608 | 608 |
609 void MacroAssembler::ConvertIntToDouble(Register src, | 609 void MacroAssembler::ConvertIntToDouble(Register src, |
610 DoubleRegister double_dst) { | 610 DoubleRegister double_dst) { |
611 MovIntToDouble(double_dst, src, r0); | 611 MovIntToDouble(double_dst, src, r0); |
612 fcfid(double_dst, double_dst); | 612 fcfid(double_dst, double_dst); |
613 } | 613 } |
614 | 614 |
615 | 615 |
(...skipping 3908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4524 } | 4524 } |
4525 if (mag.shift > 0) srawi(result, result, mag.shift); | 4525 if (mag.shift > 0) srawi(result, result, mag.shift); |
4526 ExtractBit(r0, dividend, 31); | 4526 ExtractBit(r0, dividend, 31); |
4527 add(result, result, r0); | 4527 add(result, result, r0); |
4528 } | 4528 } |
4529 | 4529 |
4530 } // namespace internal | 4530 } // namespace internal |
4531 } // namespace v8 | 4531 } // namespace v8 |
4532 | 4532 |
4533 #endif // V8_TARGET_ARCH_PPC | 4533 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |