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 { |
(...skipping 15 matching lines...) Expand all Loading... |
26 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 26 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, |
27 int call_argc) { | 27 int call_argc) { |
28 // 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 |
29 // the trampoline pool in the debug break slot code. | 29 // the trampoline pool in the debug break slot code. |
30 Assembler::BlockTrampolinePoolScope block_pool(masm); | 30 Assembler::BlockTrampolinePoolScope block_pool(masm); |
31 masm->RecordDebugBreakSlot(mode, call_argc); | 31 masm->RecordDebugBreakSlot(mode, call_argc); |
32 EmitDebugBreakSlot(masm); | 32 EmitDebugBreakSlot(masm); |
33 } | 33 } |
34 | 34 |
35 | 35 |
36 void DebugCodegen::ClearDebugBreakSlot(Address pc) { | 36 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
37 CodePatcher patcher(pc, Assembler::kDebugBreakSlotInstructions); | 37 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
38 EmitDebugBreakSlot(patcher.masm()); | 38 EmitDebugBreakSlot(patcher.masm()); |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 void DebugCodegen::PatchDebugBreakSlot(Address pc, Handle<Code> code) { | 42 void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, |
| 43 Handle<Code> code) { |
43 DCHECK_EQ(Code::BUILTIN, code->kind()); | 44 DCHECK_EQ(Code::BUILTIN, code->kind()); |
44 CodePatcher patcher(pc, Assembler::kDebugBreakSlotInstructions); | 45 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
45 // Patch the code changing the debug break slot code from: | 46 // Patch the code changing the debug break slot code from: |
46 // nop(DEBUG_BREAK_NOP) - nop(1) is sll(zero_reg, zero_reg, 1) | 47 // nop(DEBUG_BREAK_NOP) - nop(1) is sll(zero_reg, zero_reg, 1) |
47 // nop(DEBUG_BREAK_NOP) | 48 // nop(DEBUG_BREAK_NOP) |
48 // nop(DEBUG_BREAK_NOP) | 49 // nop(DEBUG_BREAK_NOP) |
49 // nop(DEBUG_BREAK_NOP) | 50 // nop(DEBUG_BREAK_NOP) |
50 // nop(DEBUG_BREAK_NOP) | 51 // nop(DEBUG_BREAK_NOP) |
51 // nop(DEBUG_BREAK_NOP) | 52 // nop(DEBUG_BREAK_NOP) |
52 // to a call to the debug break slot code. | 53 // to a call to the debug break slot code. |
53 // li t9, address (4-instruction sequence on mips64) | 54 // li t9, address (4-instruction sequence on mips64) |
54 // call t9 (jalr t9 / nop instruction pair) | 55 // call t9 (jalr t9 / nop instruction pair) |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 142 |
142 | 143 |
143 const bool LiveEdit::kFrameDropperSupported = true; | 144 const bool LiveEdit::kFrameDropperSupported = true; |
144 | 145 |
145 #undef __ | 146 #undef __ |
146 | 147 |
147 } // namespace internal | 148 } // namespace internal |
148 } // namespace v8 | 149 } // namespace v8 |
149 | 150 |
150 #endif // V8_TARGET_ARCH_MIPS64 | 151 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |