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

Side by Side Diff: src/mips/code-stubs-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/hydrogen-instructions.cc ('k') | src/mips/lithium-codegen-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>
6
7 #include "src/v8.h" 5 #include "src/v8.h"
8 6
9 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
10 8
11 #include "src/base/bits.h" 9 #include "src/base/bits.h"
12 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
13 #include "src/code-stubs.h" 11 #include "src/code-stubs.h"
14 #include "src/codegen.h" 12 #include "src/codegen.h"
15 #include "src/ic/handler-compiler.h" 13 #include "src/ic/handler-compiler.h"
16 #include "src/ic/ic.h" 14 #include "src/ic/ic.h"
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 __ Move(double_scratch, 0.5); 848 __ Move(double_scratch, 0.5);
851 __ BranchF(USE_DELAY_SLOT, 849 __ BranchF(USE_DELAY_SLOT,
852 &not_plus_half, 850 &not_plus_half,
853 NULL, 851 NULL,
854 ne, 852 ne,
855 double_exponent, 853 double_exponent,
856 double_scratch); 854 double_scratch);
857 // double_scratch can be overwritten in the delay slot. 855 // double_scratch can be overwritten in the delay slot.
858 // Calculates square root of base. Check for the special case of 856 // Calculates square root of base. Check for the special case of
859 // Math.pow(-Infinity, 0.5) == Infinity (ECMA spec, 15.8.2.13). 857 // Math.pow(-Infinity, 0.5) == Infinity (ECMA spec, 15.8.2.13).
860 __ Move(double_scratch, std::numeric_limits<double>::infinity()); 858 __ Move(double_scratch, static_cast<double>(-V8_INFINITY));
861 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch); 859 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch);
862 __ neg_d(double_result, double_scratch); 860 __ neg_d(double_result, double_scratch);
863 861
864 // Add +0 to convert -0 to +0. 862 // Add +0 to convert -0 to +0.
865 __ add_d(double_scratch, double_base, kDoubleRegZero); 863 __ add_d(double_scratch, double_base, kDoubleRegZero);
866 __ sqrt_d(double_result, double_scratch); 864 __ sqrt_d(double_result, double_scratch);
867 __ jmp(&done); 865 __ jmp(&done);
868 866
869 __ bind(&not_plus_half); 867 __ bind(&not_plus_half);
870 __ Move(double_scratch, -0.5); 868 __ Move(double_scratch, -0.5);
871 __ BranchF(USE_DELAY_SLOT, 869 __ BranchF(USE_DELAY_SLOT,
872 &call_runtime, 870 &call_runtime,
873 NULL, 871 NULL,
874 ne, 872 ne,
875 double_exponent, 873 double_exponent,
876 double_scratch); 874 double_scratch);
877 // double_scratch can be overwritten in the delay slot. 875 // double_scratch can be overwritten in the delay slot.
878 // Calculates square root of base. Check for the special case of 876 // Calculates square root of base. Check for the special case of
879 // Math.pow(-Infinity, -0.5) == 0 (ECMA spec, 15.8.2.13). 877 // Math.pow(-Infinity, -0.5) == 0 (ECMA spec, 15.8.2.13).
880 __ Move(double_scratch, std::numeric_limits<double>::infinity()); 878 __ Move(double_scratch, static_cast<double>(-V8_INFINITY));
881 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch); 879 __ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch);
882 __ Move(double_result, kDoubleRegZero); 880 __ Move(double_result, kDoubleRegZero);
883 881
884 // Add +0 to convert -0 to +0. 882 // Add +0 to convert -0 to +0.
885 __ add_d(double_scratch, double_base, kDoubleRegZero); 883 __ add_d(double_scratch, double_base, kDoubleRegZero);
886 __ Move(double_result, 1.); 884 __ Move(double_result, 1.);
887 __ sqrt_d(double_scratch, double_scratch); 885 __ sqrt_d(double_scratch, double_scratch);
888 __ div_d(double_result, double_result, double_scratch); 886 __ div_d(double_result, double_result, double_scratch);
889 __ jmp(&done); 887 __ jmp(&done);
890 } 888 }
(...skipping 4077 matching lines...) Expand 10 before | Expand all | Expand 10 after
4968 MemOperand(fp, 6 * kPointerSize), 4966 MemOperand(fp, 6 * kPointerSize),
4969 NULL); 4967 NULL);
4970 } 4968 }
4971 4969
4972 4970
4973 #undef __ 4971 #undef __
4974 4972
4975 } } // namespace v8::internal 4973 } } // namespace v8::internal
4976 4974
4977 #endif // V8_TARGET_ARCH_MIPS 4975 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698