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