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

Side by Side Diff: src/mips/lithium-codegen-mips.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/mips/code-stubs-mips.cc ('k') | src/mips/simulator-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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
11 // with the distribution. 11 // with the distribution.
12 // * Neither the name of Google Inc. nor the names of its 12 // * Neither the name of Google Inc. nor the names of its
13 // contributors may be used to endorse or promote products derived 13 // contributors may be used to endorse or promote products derived
14 // from this software without specific prior written permission. 14 // from this software without specific prior written permission.
15 // 15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #include <limits>
29
30 #include "src/v8.h" 28 #include "src/v8.h"
31 29
32 #include "src/base/bits.h" 30 #include "src/base/bits.h"
33 #include "src/code-factory.h" 31 #include "src/code-factory.h"
34 #include "src/code-stubs.h" 32 #include "src/code-stubs.h"
35 #include "src/hydrogen-osr.h" 33 #include "src/hydrogen-osr.h"
36 #include "src/ic/ic.h" 34 #include "src/ic/ic.h"
37 #include "src/ic/stub-cache.h" 35 #include "src/ic/stub-cache.h"
38 #include "src/mips/lithium-codegen-mips.h" 36 #include "src/mips/lithium-codegen-mips.h"
39 #include "src/mips/lithium-gap-resolver-mips.h" 37 #include "src/mips/lithium-gap-resolver-mips.h"
(...skipping 3797 matching lines...) Expand 10 before | Expand all | Expand 10 after
3837 DoubleRegister input = ToDoubleRegister(instr->value()); 3835 DoubleRegister input = ToDoubleRegister(instr->value());
3838 DoubleRegister result = ToDoubleRegister(instr->result()); 3836 DoubleRegister result = ToDoubleRegister(instr->result());
3839 DoubleRegister temp = ToDoubleRegister(instr->temp()); 3837 DoubleRegister temp = ToDoubleRegister(instr->temp());
3840 3838
3841 DCHECK(!input.is(result)); 3839 DCHECK(!input.is(result));
3842 3840
3843 // Note that according to ECMA-262 15.8.2.13: 3841 // Note that according to ECMA-262 15.8.2.13:
3844 // Math.pow(-Infinity, 0.5) == Infinity 3842 // Math.pow(-Infinity, 0.5) == Infinity
3845 // Math.sqrt(-Infinity) == NaN 3843 // Math.sqrt(-Infinity) == NaN
3846 Label done; 3844 Label done;
3847 __ Move(temp, std::numeric_limits<double>::infinity()); 3845 __ Move(temp, static_cast<double>(-V8_INFINITY));
3848 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, temp, input); 3846 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, temp, input);
3849 // Set up Infinity in the delay slot. 3847 // Set up Infinity in the delay slot.
3850 // result is overwritten if the branch is not taken. 3848 // result is overwritten if the branch is not taken.
3851 __ neg_d(result, temp); 3849 __ neg_d(result, temp);
3852 3850
3853 // Add +0 to convert -0 to +0. 3851 // Add +0 to convert -0 to +0.
3854 __ add_d(result, input, kDoubleRegZero); 3852 __ add_d(result, input, kDoubleRegZero);
3855 __ sqrt_d(result, result); 3853 __ sqrt_d(result, result);
3856 __ bind(&done); 3854 __ bind(&done);
3857 } 3855 }
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after
5963 __ li(at, scope_info); 5961 __ li(at, scope_info);
5964 __ Push(at, ToRegister(instr->function())); 5962 __ Push(at, ToRegister(instr->function()));
5965 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5963 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5966 RecordSafepoint(Safepoint::kNoLazyDeopt); 5964 RecordSafepoint(Safepoint::kNoLazyDeopt);
5967 } 5965 }
5968 5966
5969 5967
5970 #undef __ 5968 #undef __
5971 5969
5972 } } // namespace v8::internal 5970 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698