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

Side by Side Diff: src/mips/macro-assembler-mips.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/mips/lithium-mips.h ('k') | src/mips64/codegen-mips64.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_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 3899 matching lines...) Expand 10 before | Expand all | Expand 10 after
3910 3910
3911 // Ensure that the object is a heap number 3911 // Ensure that the object is a heap number
3912 CheckMap(value_reg, 3912 CheckMap(value_reg,
3913 scratch1, 3913 scratch1,
3914 Heap::kHeapNumberMapRootIndex, 3914 Heap::kHeapNumberMapRootIndex,
3915 fail, 3915 fail,
3916 DONT_DO_SMI_CHECK); 3916 DONT_DO_SMI_CHECK);
3917 3917
3918 // Check for nan: all NaN values have a value greater (signed) than 0x7ff00000 3918 // Check for nan: all NaN values have a value greater (signed) than 0x7ff00000
3919 // in the exponent. 3919 // in the exponent.
3920 li(scratch1, Operand(kNaNOrInfinityLowerBoundUpper32)); 3920 li(scratch1, Operand(kHoleNanUpper32 & HeapNumber::kExponentMask));
3921 lw(exponent_reg, FieldMemOperand(value_reg, HeapNumber::kExponentOffset)); 3921 lw(exponent_reg, FieldMemOperand(value_reg, HeapNumber::kExponentOffset));
3922 Branch(&maybe_nan, ge, exponent_reg, Operand(scratch1)); 3922 Branch(&maybe_nan, ge, exponent_reg, Operand(scratch1));
3923 3923
3924 lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); 3924 lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset));
3925 3925
3926 bind(&have_double_value); 3926 bind(&have_double_value);
3927 sll(scratch1, key_reg, kDoubleSizeLog2 - kSmiTagSize); 3927 sll(scratch1, key_reg, kDoubleSizeLog2 - kSmiTagSize);
3928 Addu(scratch1, scratch1, elements_reg); 3928 Addu(scratch1, scratch1, elements_reg);
3929 sw(mantissa_reg, 3929 sw(mantissa_reg,
3930 FieldMemOperand(scratch1, FixedDoubleArray::kHeaderSize - elements_offset 3930 FieldMemOperand(scratch1, FixedDoubleArray::kHeaderSize - elements_offset
(...skipping 2213 matching lines...) Expand 10 before | Expand all | Expand 10 after
6144 } 6144 }
6145 if (mag.shift > 0) sra(result, result, mag.shift); 6145 if (mag.shift > 0) sra(result, result, mag.shift);
6146 srl(at, dividend, 31); 6146 srl(at, dividend, 31);
6147 Addu(result, result, Operand(at)); 6147 Addu(result, result, Operand(at));
6148 } 6148 }
6149 6149
6150 6150
6151 } } // namespace v8::internal 6151 } } // namespace v8::internal
6152 6152
6153 #endif // V8_TARGET_ARCH_MIPS 6153 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mips64/codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698