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

Side by Side Diff: src/mips64/lithium-codegen-mips64.cc

Issue 813813003: Revert of Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/code-stubs-mips64.cc ('k') | src/mips64/simulator-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>
6
7 #include "src/v8.h" 5 #include "src/v8.h"
8 6
9 #include "src/code-factory.h" 7 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
11 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
12 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
13 #include "src/ic/stub-cache.h" 11 #include "src/ic/stub-cache.h"
14 #include "src/mips64/lithium-codegen-mips64.h" 12 #include "src/mips64/lithium-codegen-mips64.h"
15 #include "src/mips64/lithium-gap-resolver-mips64.h" 13 #include "src/mips64/lithium-gap-resolver-mips64.h"
16 14
(...skipping 3852 matching lines...) Expand 10 before | Expand all | Expand 10 after
3869 DoubleRegister input = ToDoubleRegister(instr->value()); 3867 DoubleRegister input = ToDoubleRegister(instr->value());
3870 DoubleRegister result = ToDoubleRegister(instr->result()); 3868 DoubleRegister result = ToDoubleRegister(instr->result());
3871 DoubleRegister temp = ToDoubleRegister(instr->temp()); 3869 DoubleRegister temp = ToDoubleRegister(instr->temp());
3872 3870
3873 DCHECK(!input.is(result)); 3871 DCHECK(!input.is(result));
3874 3872
3875 // Note that according to ECMA-262 15.8.2.13: 3873 // Note that according to ECMA-262 15.8.2.13:
3876 // Math.pow(-Infinity, 0.5) == Infinity 3874 // Math.pow(-Infinity, 0.5) == Infinity
3877 // Math.sqrt(-Infinity) == NaN 3875 // Math.sqrt(-Infinity) == NaN
3878 Label done; 3876 Label done;
3879 __ Move(temp, std::numeric_limits<double>::infinity()); 3877 __ Move(temp, static_cast<double>(-V8_INFINITY));
3880 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, temp, input); 3878 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, temp, input);
3881 // Set up Infinity in the delay slot. 3879 // Set up Infinity in the delay slot.
3882 // result is overwritten if the branch is not taken. 3880 // result is overwritten if the branch is not taken.
3883 __ neg_d(result, temp); 3881 __ neg_d(result, temp);
3884 3882
3885 // Add +0 to convert -0 to +0. 3883 // Add +0 to convert -0 to +0.
3886 __ add_d(result, input, kDoubleRegZero); 3884 __ add_d(result, input, kDoubleRegZero);
3887 __ sqrt_d(result, result); 3885 __ sqrt_d(result, result);
3888 __ bind(&done); 3886 __ bind(&done);
3889 } 3887 }
(...skipping 2103 matching lines...) Expand 10 before | Expand all | Expand 10 after
5993 __ li(at, scope_info); 5991 __ li(at, scope_info);
5994 __ Push(at, ToRegister(instr->function())); 5992 __ Push(at, ToRegister(instr->function()));
5995 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5993 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5996 RecordSafepoint(Safepoint::kNoLazyDeopt); 5994 RecordSafepoint(Safepoint::kNoLazyDeopt);
5997 } 5995 }
5998 5996
5999 5997
6000 #undef __ 5998 #undef __
6001 5999
6002 } } // namespace v8::internal 6000 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698