| OLD | NEW |
| 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/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 10 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 11 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 12 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| 13 #include "src/code-stubs.h" | 11 #include "src/code-stubs.h" |
| 14 #include "src/hydrogen-osr.h" | 12 #include "src/hydrogen-osr.h" |
| 15 #include "src/ic/ic.h" | 13 #include "src/ic/ic.h" |
| 16 #include "src/ic/stub-cache.h" | 14 #include "src/ic/stub-cache.h" |
| (...skipping 3858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3875 | 3873 |
| 3876 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { | 3874 void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) { |
| 3877 DwVfpRegister input = ToDoubleRegister(instr->value()); | 3875 DwVfpRegister input = ToDoubleRegister(instr->value()); |
| 3878 DwVfpRegister result = ToDoubleRegister(instr->result()); | 3876 DwVfpRegister result = ToDoubleRegister(instr->result()); |
| 3879 DwVfpRegister temp = double_scratch0(); | 3877 DwVfpRegister temp = double_scratch0(); |
| 3880 | 3878 |
| 3881 // Note that according to ECMA-262 15.8.2.13: | 3879 // Note that according to ECMA-262 15.8.2.13: |
| 3882 // Math.pow(-Infinity, 0.5) == Infinity | 3880 // Math.pow(-Infinity, 0.5) == Infinity |
| 3883 // Math.sqrt(-Infinity) == NaN | 3881 // Math.sqrt(-Infinity) == NaN |
| 3884 Label done; | 3882 Label done; |
| 3885 __ vmov(temp, -std::numeric_limits<double>::infinity(), scratch0()); | 3883 __ vmov(temp, -V8_INFINITY, scratch0()); |
| 3886 __ VFPCompareAndSetFlags(input, temp); | 3884 __ VFPCompareAndSetFlags(input, temp); |
| 3887 __ vneg(result, temp, eq); | 3885 __ vneg(result, temp, eq); |
| 3888 __ b(&done, eq); | 3886 __ b(&done, eq); |
| 3889 | 3887 |
| 3890 // Add +0 to convert -0 to +0. | 3888 // Add +0 to convert -0 to +0. |
| 3891 __ vadd(result, input, kDoubleRegZero); | 3889 __ vadd(result, input, kDoubleRegZero); |
| 3892 __ vsqrt(result, result); | 3890 __ vsqrt(result, result); |
| 3893 __ bind(&done); | 3891 __ bind(&done); |
| 3894 } | 3892 } |
| 3895 | 3893 |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5950 __ Push(scope_info); | 5948 __ Push(scope_info); |
| 5951 __ push(ToRegister(instr->function())); | 5949 __ push(ToRegister(instr->function())); |
| 5952 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5950 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5953 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5951 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5954 } | 5952 } |
| 5955 | 5953 |
| 5956 | 5954 |
| 5957 #undef __ | 5955 #undef __ |
| 5958 | 5956 |
| 5959 } } // namespace v8::internal | 5957 } } // namespace v8::internal |
| OLD | NEW |