OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
10 | 10 |
(...skipping 3866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3877 scratch1, | 3877 scratch1, |
3878 Heap::kHeapNumberMapRootIndex, | 3878 Heap::kHeapNumberMapRootIndex, |
3879 fail, | 3879 fail, |
3880 DONT_DO_SMI_CHECK); | 3880 DONT_DO_SMI_CHECK); |
3881 | 3881 |
3882 // Double value, turn potential sNaN into qNan. | 3882 // Double value, turn potential sNaN into qNan. |
3883 DoubleRegister double_result = f0; | 3883 DoubleRegister double_result = f0; |
3884 DoubleRegister double_scratch = f2; | 3884 DoubleRegister double_scratch = f2; |
3885 | 3885 |
3886 ldc1(double_result, FieldMemOperand(value_reg, HeapNumber::kValueOffset)); | 3886 ldc1(double_result, FieldMemOperand(value_reg, HeapNumber::kValueOffset)); |
3887 Branch(USE_DELAY_SLOT, &done); // Canonicalization is one instruction. | |
3887 FPUCanonicalizeNaN(double_result, double_result); | 3888 FPUCanonicalizeNaN(double_result, double_result); |
3888 Branch(&done); | |
3889 | 3889 |
3890 bind(&smi_value); | 3890 bind(&smi_value); |
3891 // scratch1 is now effective address of the double element. | 3891 // scratch1 is now effective address of the double element. |
paul.l...
2015/02/25 16:21:38
nit: It looks like this comment is now stale - scr
| |
3892 // Untag and transfer. | 3892 // Untag and transfer. |
3893 mthc1(value_reg, double_scratch); | 3893 dsrl32(at, value_reg, 0); |
3894 mtc1(at, double_scratch); | |
3894 cvt_d_w(double_result, double_scratch); | 3895 cvt_d_w(double_result, double_scratch); |
3895 | 3896 |
3896 bind(&done); | 3897 bind(&done); |
3897 Daddu(scratch1, elements_reg, | 3898 Daddu(scratch1, elements_reg, |
3898 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag - | 3899 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag - |
3899 elements_offset)); | 3900 elements_offset)); |
3900 dsra(scratch2, key_reg, 32 - kDoubleSizeLog2); | 3901 dsra(scratch2, key_reg, 32 - kDoubleSizeLog2); |
3901 Daddu(scratch1, scratch1, scratch2); | 3902 Daddu(scratch1, scratch1, scratch2); |
3902 sdc1(double_result, MemOperand(scratch1, 0)); | 3903 sdc1(double_result, MemOperand(scratch1, 0)); |
3903 } | 3904 } |
(...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6191 } | 6192 } |
6192 if (mag.shift > 0) sra(result, result, mag.shift); | 6193 if (mag.shift > 0) sra(result, result, mag.shift); |
6193 srl(at, dividend, 31); | 6194 srl(at, dividend, 31); |
6194 Addu(result, result, Operand(at)); | 6195 Addu(result, result, Operand(at)); |
6195 } | 6196 } |
6196 | 6197 |
6197 | 6198 |
6198 } } // namespace v8::internal | 6199 } } // namespace v8::internal |
6199 | 6200 |
6200 #endif // V8_TARGET_ARCH_MIPS64 | 6201 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |