| 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
| 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 5788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5799 RecordComment("Abort message: "); | 5799 RecordComment("Abort message: "); |
| 5800 RecordComment(msg); | 5800 RecordComment(msg); |
| 5801 } | 5801 } |
| 5802 | 5802 |
| 5803 if (FLAG_trap_on_abort) { | 5803 if (FLAG_trap_on_abort) { |
| 5804 stop(msg); | 5804 stop(msg); |
| 5805 return; | 5805 return; |
| 5806 } | 5806 } |
| 5807 #endif | 5807 #endif |
| 5808 | 5808 |
| 5809 li(a0, Operand(Smi::FromInt(reason))); | 5809 // Check if Abort() has already been initialized. |
| 5810 push(a0); | 5810 DCHECK(isolate()->builtins()->Abort()->IsHeapObject()); |
| 5811 |
| 5812 Move(a0, Smi::FromInt(static_cast<int>(reason))); |
| 5813 |
| 5811 // Disable stub call restrictions to always allow calls to abort. | 5814 // Disable stub call restrictions to always allow calls to abort. |
| 5812 if (!has_frame_) { | 5815 if (!has_frame_) { |
| 5813 // We don't actually want to generate a pile of code for this, so just | 5816 // We don't actually want to generate a pile of code for this, so just |
| 5814 // claim there is a stack frame, without generating one. | 5817 // claim there is a stack frame, without generating one. |
| 5815 FrameScope scope(this, StackFrame::NONE); | 5818 FrameScope scope(this, StackFrame::NONE); |
| 5816 CallRuntime(Runtime::kAbort); | 5819 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); |
| 5817 } else { | 5820 } else { |
| 5818 CallRuntime(Runtime::kAbort); | 5821 Call(isolate()->builtins()->Abort(), RelocInfo::CODE_TARGET); |
| 5819 } | 5822 } |
| 5820 // Will not return here. | 5823 // Will not return here. |
| 5821 if (is_trampoline_pool_blocked()) { | 5824 if (is_trampoline_pool_blocked()) { |
| 5822 // If the calling code cares about the exact number of | 5825 // If the calling code cares about the exact number of |
| 5823 // instructions generated, we insert padding here to keep the size | 5826 // instructions generated, we insert padding here to keep the size |
| 5824 // of the Abort macro constant. | 5827 // of the Abort macro constant. |
| 5825 // Currently in debug mode with debug_code enabled the number of | 5828 // Currently in debug mode with debug_code enabled the number of |
| 5826 // generated instructions is 10, so we use this as a maximum value. | 5829 // generated instructions is 10, so we use this as a maximum value. |
| 5827 static const int kExpectedAbortInstructions = 10; | 5830 static const int kExpectedAbortInstructions = 10; |
| 5828 int abort_instructions = InstructionsGeneratedSince(&abort_start); | 5831 int abort_instructions = InstructionsGeneratedSince(&abort_start); |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6988 if (mag.shift > 0) sra(result, result, mag.shift); | 6991 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6989 srl(at, dividend, 31); | 6992 srl(at, dividend, 31); |
| 6990 Addu(result, result, Operand(at)); | 6993 Addu(result, result, Operand(at)); |
| 6991 } | 6994 } |
| 6992 | 6995 |
| 6993 | 6996 |
| 6994 } // namespace internal | 6997 } // namespace internal |
| 6995 } // namespace v8 | 6998 } // namespace v8 |
| 6996 | 6999 |
| 6997 #endif // V8_TARGET_ARCH_MIPS | 7000 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |