| 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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 #define __ ACCESS_MASM(masm) | 13 #define __ ACCESS_MASM(masm) |
| 14 | 14 |
| 15 | 15 |
| 16 void EmitDebugBreakSlot(MacroAssembler* masm) { | 16 void EmitDebugBreakSlot(MacroAssembler* masm) { |
| 17 Label check_size; | 17 Label check_size; |
| 18 __ bind(&check_size); | 18 __ bind(&check_size); |
| 19 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { | 19 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
| 20 __ nop(MacroAssembler::DEBUG_BREAK_NOP); | 20 __ nop(MacroAssembler::DEBUG_BREAK_NOP); |
| 21 } | 21 } |
| 22 DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, | 22 DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, |
| 23 masm->InstructionsGeneratedSince(&check_size)); | 23 masm->InstructionsGeneratedSince(&check_size)); |
| 24 } | 24 } |
| 25 | 25 |
| 26 | 26 |
| 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { |
| 28 int call_argc) { | |
| 29 // Generate enough nop's to make space for a call instruction. Avoid emitting | 28 // Generate enough nop's to make space for a call instruction. Avoid emitting |
| 30 // the trampoline pool in the debug break slot code. | 29 // the trampoline pool in the debug break slot code. |
| 31 Assembler::BlockTrampolinePoolScope block_pool(masm); | 30 Assembler::BlockTrampolinePoolScope block_pool(masm); |
| 32 masm->RecordDebugBreakSlot(mode, call_argc); | 31 masm->RecordDebugBreakSlot(mode); |
| 33 EmitDebugBreakSlot(masm); | 32 EmitDebugBreakSlot(masm); |
| 34 } | 33 } |
| 35 | 34 |
| 36 | 35 |
| 37 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { | 36 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
| 38 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); | 37 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
| 39 EmitDebugBreakSlot(patcher.masm()); | 38 EmitDebugBreakSlot(patcher.masm()); |
| 40 } | 39 } |
| 41 | 40 |
| 42 | 41 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 139 |
| 141 | 140 |
| 142 const bool LiveEdit::kFrameDropperSupported = true; | 141 const bool LiveEdit::kFrameDropperSupported = true; |
| 143 | 142 |
| 144 #undef __ | 143 #undef __ |
| 145 | 144 |
| 146 } // namespace internal | 145 } // namespace internal |
| 147 } // namespace v8 | 146 } // namespace v8 |
| 148 | 147 |
| 149 #endif // V8_TARGET_ARCH_MIPS | 148 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |