Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: src/mips64/macro-assembler-mips64.cc

Issue 867453002: MIPS: Use signaling NaN for holes in fixed double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: port Benedikt's fix for x87 sNaN corruption in simulator. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/codegen-mips64.cc ('k') | test/cctest/test-macro-assembler-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
3877 3877
3878 // Ensure that the object is a heap number 3878 // Ensure that the object is a heap number
3879 CheckMap(value_reg, 3879 CheckMap(value_reg,
3880 scratch1, 3880 scratch1,
3881 Heap::kHeapNumberMapRootIndex, 3881 Heap::kHeapNumberMapRootIndex,
3882 fail, 3882 fail,
3883 DONT_DO_SMI_CHECK); 3883 DONT_DO_SMI_CHECK);
3884 3884
3885 // Check for nan: all NaN values have a value greater (signed) than 0x7ff00000 3885 // Check for nan: all NaN values have a value greater (signed) than 0x7ff00000
3886 // in the exponent. 3886 // in the exponent.
3887 li(scratch1, Operand(kNaNOrInfinityLowerBoundUpper32)); 3887 li(scratch1, Operand(kHoleNanUpper32 & HeapNumber::kExponentMask));
3888 lw(exponent_reg, FieldMemOperand(value_reg, HeapNumber::kExponentOffset)); 3888 lw(exponent_reg, FieldMemOperand(value_reg, HeapNumber::kExponentOffset));
3889 Branch(&maybe_nan, ge, exponent_reg, Operand(scratch1)); 3889 Branch(&maybe_nan, ge, exponent_reg, Operand(scratch1));
3890 3890
3891 lwu(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); 3891 lwu(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset));
3892 3892
3893 bind(&have_double_value); 3893 bind(&have_double_value);
3894 // dsll(scratch1, key_reg, kDoubleSizeLog2 - kSmiTagSize); 3894 // dsll(scratch1, key_reg, kDoubleSizeLog2 - kSmiTagSize);
3895 dsra(scratch1, key_reg, 32 - kDoubleSizeLog2); 3895 dsra(scratch1, key_reg, 32 - kDoubleSizeLog2);
3896 Daddu(scratch1, scratch1, elements_reg); 3896 Daddu(scratch1, scratch1, elements_reg);
3897 sw(mantissa_reg, FieldMemOperand( 3897 sw(mantissa_reg, FieldMemOperand(
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after
6188 } 6188 }
6189 if (mag.shift > 0) sra(result, result, mag.shift); 6189 if (mag.shift > 0) sra(result, result, mag.shift);
6190 srl(at, dividend, 31); 6190 srl(at, dividend, 31);
6191 Addu(result, result, Operand(at)); 6191 Addu(result, result, Operand(at));
6192 } 6192 }
6193 6193
6194 6194
6195 } } // namespace v8::internal 6195 } } // namespace v8::internal
6196 6196
6197 #endif // V8_TARGET_ARCH_MIPS64 6197 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/codegen-mips64.cc ('k') | test/cctest/test-macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698