| 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.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 } | 1323 } |
| 1324 if (actual.is_reg()) { | 1324 if (actual.is_reg()) { |
| 1325 SmiTag(actual.reg()); | 1325 SmiTag(actual.reg()); |
| 1326 Push(actual.reg()); | 1326 Push(actual.reg()); |
| 1327 } | 1327 } |
| 1328 if (new_target.is_valid()) { | 1328 if (new_target.is_valid()) { |
| 1329 Push(new_target); | 1329 Push(new_target); |
| 1330 } | 1330 } |
| 1331 Push(fun); | 1331 Push(fun); |
| 1332 Push(fun); | 1332 Push(fun); |
| 1333 CallRuntime(Runtime::kDebugPrepareStepInIfStepping, 1); | 1333 CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
| 1334 Pop(fun); | 1334 Pop(fun); |
| 1335 if (new_target.is_valid()) { | 1335 if (new_target.is_valid()) { |
| 1336 Pop(new_target); | 1336 Pop(new_target); |
| 1337 } | 1337 } |
| 1338 if (actual.is_reg()) { | 1338 if (actual.is_reg()) { |
| 1339 Pop(actual.reg()); | 1339 Pop(actual.reg()); |
| 1340 SmiUntag(actual.reg()); | 1340 SmiUntag(actual.reg()); |
| 1341 } | 1341 } |
| 1342 if (expected.is_reg()) { | 1342 if (expected.is_reg()) { |
| 1343 Pop(expected.reg()); | 1343 Pop(expected.reg()); |
| (...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2606 #endif | 2606 #endif |
| 2607 | 2607 |
| 2608 mov(r0, Operand(Smi::FromInt(reason))); | 2608 mov(r0, Operand(Smi::FromInt(reason))); |
| 2609 push(r0); | 2609 push(r0); |
| 2610 | 2610 |
| 2611 // Disable stub call restrictions to always allow calls to abort. | 2611 // Disable stub call restrictions to always allow calls to abort. |
| 2612 if (!has_frame_) { | 2612 if (!has_frame_) { |
| 2613 // We don't actually want to generate a pile of code for this, so just | 2613 // We don't actually want to generate a pile of code for this, so just |
| 2614 // claim there is a stack frame, without generating one. | 2614 // claim there is a stack frame, without generating one. |
| 2615 FrameScope scope(this, StackFrame::NONE); | 2615 FrameScope scope(this, StackFrame::NONE); |
| 2616 CallRuntime(Runtime::kAbort, 1); | 2616 CallRuntime(Runtime::kAbort); |
| 2617 } else { | 2617 } else { |
| 2618 CallRuntime(Runtime::kAbort, 1); | 2618 CallRuntime(Runtime::kAbort); |
| 2619 } | 2619 } |
| 2620 // will not return here | 2620 // will not return here |
| 2621 if (is_const_pool_blocked()) { | 2621 if (is_const_pool_blocked()) { |
| 2622 // If the calling code cares about the exact number of | 2622 // If the calling code cares about the exact number of |
| 2623 // instructions generated, we insert padding here to keep the size | 2623 // instructions generated, we insert padding here to keep the size |
| 2624 // of the Abort macro constant. | 2624 // of the Abort macro constant. |
| 2625 static const int kExpectedAbortInstructions = 7; | 2625 static const int kExpectedAbortInstructions = 7; |
| 2626 int abort_instructions = InstructionsGeneratedSince(&abort_start); | 2626 int abort_instructions = InstructionsGeneratedSince(&abort_start); |
| 2627 DCHECK(abort_instructions <= kExpectedAbortInstructions); | 2627 DCHECK(abort_instructions <= kExpectedAbortInstructions); |
| 2628 while (abort_instructions++ < kExpectedAbortInstructions) { | 2628 while (abort_instructions++ < kExpectedAbortInstructions) { |
| (...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3617 } | 3617 } |
| 3618 } | 3618 } |
| 3619 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3619 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 3620 add(result, result, Operand(dividend, LSR, 31)); | 3620 add(result, result, Operand(dividend, LSR, 31)); |
| 3621 } | 3621 } |
| 3622 | 3622 |
| 3623 } // namespace internal | 3623 } // namespace internal |
| 3624 } // namespace v8 | 3624 } // namespace v8 |
| 3625 | 3625 |
| 3626 #endif // V8_TARGET_ARCH_ARM | 3626 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |