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

Side by Side Diff: src/mips64/code-stubs-mips64.cc

Issue 798413003: Remove obsolete V8_INFINITY macro. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Svens smiley. 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/simulator-mips.cc ('k') | src/mips64/lithium-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>
6
5 #include "src/v8.h" 7 #include "src/v8.h"
6 8
7 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
8 10
9 #include "src/bootstrapper.h" 11 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 12 #include "src/code-stubs.h"
11 #include "src/codegen.h" 13 #include "src/codegen.h"
12 #include "src/ic/handler-compiler.h" 14 #include "src/ic/handler-compiler.h"
13 #include "src/ic/ic.h" 15 #include "src/ic/ic.h"
14 #include "src/isolate.h" 16 #include "src/isolate.h"
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 __ Move(double_scratch, 0.5); 846 __ Move(double_scratch, 0.5);
845 __ BranchF(USE_DELAY_SLOT, 847 __ BranchF(USE_DELAY_SLOT,
846 &not_plus_half, 848 &not_plus_half,
847 NULL, 849 NULL,
848 ne, 850 ne,
849 double_exponent, 851 double_exponent,
850 double_scratch); 852 double_scratch);
851 // double_scratch can be overwritten in the delay slot. 853 // double_scratch can be overwritten in the delay slot.
852 // Calculates square root of base. Check for the special case of 854 // Calculates square root of base. Check for the special case of
853 // Math.pow(-Infinity, 0.5) == Infinity (ECMA spec, 15.8.2.13). 855 // Math.pow(-Infinity, 0.5) == Infinity (ECMA spec, 15.8.2.13).
854 __ Move(double_scratch, static_cast<double>(-V8_INFINITY)); 856 __ Move(double_scratch, std::numeric_limits<double>::infinity());
855 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch); 857 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch);
856 __ neg_d(double_result, double_scratch); 858 __ neg_d(double_result, double_scratch);
857 859
858 // Add +0 to convert -0 to +0. 860 // Add +0 to convert -0 to +0.
859 __ add_d(double_scratch, double_base, kDoubleRegZero); 861 __ add_d(double_scratch, double_base, kDoubleRegZero);
860 __ sqrt_d(double_result, double_scratch); 862 __ sqrt_d(double_result, double_scratch);
861 __ jmp(&done); 863 __ jmp(&done);
862 864
863 __ bind(&not_plus_half); 865 __ bind(&not_plus_half);
864 __ Move(double_scratch, -0.5); 866 __ Move(double_scratch, -0.5);
865 __ BranchF(USE_DELAY_SLOT, 867 __ BranchF(USE_DELAY_SLOT,
866 &call_runtime, 868 &call_runtime,
867 NULL, 869 NULL,
868 ne, 870 ne,
869 double_exponent, 871 double_exponent,
870 double_scratch); 872 double_scratch);
871 // double_scratch can be overwritten in the delay slot. 873 // double_scratch can be overwritten in the delay slot.
872 // Calculates square root of base. Check for the special case of 874 // Calculates square root of base. Check for the special case of
873 // Math.pow(-Infinity, -0.5) == 0 (ECMA spec, 15.8.2.13). 875 // Math.pow(-Infinity, -0.5) == 0 (ECMA spec, 15.8.2.13).
874 __ Move(double_scratch, static_cast<double>(-V8_INFINITY)); 876 __ Move(double_scratch, std::numeric_limits<double>::infinity());
875 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch); 877 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch);
876 __ Move(double_result, kDoubleRegZero); 878 __ Move(double_result, kDoubleRegZero);
877 879
878 // Add +0 to convert -0 to +0. 880 // Add +0 to convert -0 to +0.
879 __ add_d(double_scratch, double_base, kDoubleRegZero); 881 __ add_d(double_scratch, double_base, kDoubleRegZero);
880 __ Move(double_result, 1.); 882 __ Move(double_result, 1.);
881 __ sqrt_d(double_scratch, double_scratch); 883 __ sqrt_d(double_scratch, double_scratch);
882 __ div_d(double_result, double_result, double_scratch); 884 __ div_d(double_result, double_result, double_scratch);
883 __ jmp(&done); 885 __ jmp(&done);
884 } 886 }
(...skipping 4121 matching lines...) Expand 10 before | Expand all | Expand 10 after
5006 MemOperand(fp, 6 * kPointerSize), 5008 MemOperand(fp, 6 * kPointerSize),
5007 NULL); 5009 NULL);
5008 } 5010 }
5009 5011
5010 5012
5011 #undef __ 5013 #undef __
5012 5014
5013 } } // namespace v8::internal 5015 } } // namespace v8::internal
5014 5016
5015 #endif // V8_TARGET_ARCH_MIPS64 5017 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698