OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2813 HBinaryOperation* hdiv = instr->hydrogen(); | 2813 HBinaryOperation* hdiv = instr->hydrogen(); |
2814 Register dividend = ToRegister32(instr->dividend()); | 2814 Register dividend = ToRegister32(instr->dividend()); |
2815 Register divisor = ToRegister32(instr->divisor()); | 2815 Register divisor = ToRegister32(instr->divisor()); |
2816 Register result = ToRegister32(instr->result()); | 2816 Register result = ToRegister32(instr->result()); |
2817 | 2817 |
2818 // Issue the division first, and then check for any deopt cases whilst the | 2818 // Issue the division first, and then check for any deopt cases whilst the |
2819 // result is computed. | 2819 // result is computed. |
2820 __ Sdiv(result, dividend, divisor); | 2820 __ Sdiv(result, dividend, divisor); |
2821 | 2821 |
2822 if (hdiv->CheckFlag(HValue::kAllUsesTruncatingToInt32)) { | 2822 if (hdiv->CheckFlag(HValue::kAllUsesTruncatingToInt32)) { |
2823 DCHECK_EQ(NULL, instr->temp()); | 2823 DCHECK(!instr->temp()); |
2824 return; | 2824 return; |
2825 } | 2825 } |
2826 | 2826 |
2827 // Check for x / 0. | 2827 // Check for x / 0. |
2828 if (hdiv->CheckFlag(HValue::kCanBeDivByZero)) { | 2828 if (hdiv->CheckFlag(HValue::kCanBeDivByZero)) { |
2829 DeoptimizeIfZero(divisor, instr, "division by zero"); | 2829 DeoptimizeIfZero(divisor, instr, "division by zero"); |
2830 } | 2830 } |
2831 | 2831 |
2832 // Check for (0 / -x) as that will produce negative zero. | 2832 // Check for (0 / -x) as that will produce negative zero. |
2833 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero)) { | 2833 if (hdiv->CheckFlag(HValue::kBailoutOnMinusZero)) { |
(...skipping 3251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6085 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6085 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6086 __ Push(scope_info); | 6086 __ Push(scope_info); |
6087 __ Push(ToRegister(instr->function())); | 6087 __ Push(ToRegister(instr->function())); |
6088 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6088 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6089 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6089 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6090 } | 6090 } |
6091 | 6091 |
6092 | 6092 |
6093 | 6093 |
6094 } } // namespace v8::internal | 6094 } } // namespace v8::internal |
OLD | NEW |