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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 4461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4472 } | 4472 } |
4473 if (actual.is_reg()) { | 4473 if (actual.is_reg()) { |
4474 SmiTag(actual.reg()); | 4474 SmiTag(actual.reg()); |
4475 Push(actual.reg()); | 4475 Push(actual.reg()); |
4476 } | 4476 } |
4477 if (new_target.is_valid()) { | 4477 if (new_target.is_valid()) { |
4478 Push(new_target); | 4478 Push(new_target); |
4479 } | 4479 } |
4480 Push(fun); | 4480 Push(fun); |
4481 Push(fun); | 4481 Push(fun); |
4482 CallRuntime(Runtime::kDebugPrepareStepInIfStepping, 1); | 4482 CallRuntime(Runtime::kDebugPrepareStepInIfStepping); |
4483 Pop(fun); | 4483 Pop(fun); |
4484 if (new_target.is_valid()) { | 4484 if (new_target.is_valid()) { |
4485 Pop(new_target); | 4485 Pop(new_target); |
4486 } | 4486 } |
4487 if (actual.is_reg()) { | 4487 if (actual.is_reg()) { |
4488 Pop(actual.reg()); | 4488 Pop(actual.reg()); |
4489 SmiUntag(actual.reg()); | 4489 SmiUntag(actual.reg()); |
4490 } | 4490 } |
4491 if (expected.is_reg()) { | 4491 if (expected.is_reg()) { |
4492 Pop(expected.reg()); | 4492 Pop(expected.reg()); |
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5331 } | 5331 } |
5332 #endif | 5332 #endif |
5333 | 5333 |
5334 li(a0, Operand(Smi::FromInt(reason))); | 5334 li(a0, Operand(Smi::FromInt(reason))); |
5335 push(a0); | 5335 push(a0); |
5336 // Disable stub call restrictions to always allow calls to abort. | 5336 // Disable stub call restrictions to always allow calls to abort. |
5337 if (!has_frame_) { | 5337 if (!has_frame_) { |
5338 // We don't actually want to generate a pile of code for this, so just | 5338 // We don't actually want to generate a pile of code for this, so just |
5339 // claim there is a stack frame, without generating one. | 5339 // claim there is a stack frame, without generating one. |
5340 FrameScope scope(this, StackFrame::NONE); | 5340 FrameScope scope(this, StackFrame::NONE); |
5341 CallRuntime(Runtime::kAbort, 1); | 5341 CallRuntime(Runtime::kAbort); |
5342 } else { | 5342 } else { |
5343 CallRuntime(Runtime::kAbort, 1); | 5343 CallRuntime(Runtime::kAbort); |
5344 } | 5344 } |
5345 // Will not return here. | 5345 // Will not return here. |
5346 if (is_trampoline_pool_blocked()) { | 5346 if (is_trampoline_pool_blocked()) { |
5347 // If the calling code cares about the exact number of | 5347 // If the calling code cares about the exact number of |
5348 // instructions generated, we insert padding here to keep the size | 5348 // instructions generated, we insert padding here to keep the size |
5349 // of the Abort macro constant. | 5349 // of the Abort macro constant. |
5350 // Currently in debug mode with debug_code enabled the number of | 5350 // Currently in debug mode with debug_code enabled the number of |
5351 // generated instructions is 10, so we use this as a maximum value. | 5351 // generated instructions is 10, so we use this as a maximum value. |
5352 static const int kExpectedAbortInstructions = 10; | 5352 static const int kExpectedAbortInstructions = 10; |
5353 int abort_instructions = InstructionsGeneratedSince(&abort_start); | 5353 int abort_instructions = InstructionsGeneratedSince(&abort_start); |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6505 if (mag.shift > 0) sra(result, result, mag.shift); | 6505 if (mag.shift > 0) sra(result, result, mag.shift); |
6506 srl(at, dividend, 31); | 6506 srl(at, dividend, 31); |
6507 Addu(result, result, Operand(at)); | 6507 Addu(result, result, Operand(at)); |
6508 } | 6508 } |
6509 | 6509 |
6510 | 6510 |
6511 } // namespace internal | 6511 } // namespace internal |
6512 } // namespace v8 | 6512 } // namespace v8 |
6513 | 6513 |
6514 #endif // V8_TARGET_ARCH_MIPS64 | 6514 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |