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 { |
(...skipping 16 matching lines...) Expand all Loading... |
27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, |
28 int call_argc) { | 28 int call_argc) { |
29 // Generate enough nop's to make space for a call instruction. Avoid emitting | 29 // Generate enough nop's to make space for a call instruction. Avoid emitting |
30 // the trampoline pool in the debug break slot code. | 30 // the trampoline pool in the debug break slot code. |
31 Assembler::BlockTrampolinePoolScope block_pool(masm); | 31 Assembler::BlockTrampolinePoolScope block_pool(masm); |
32 masm->RecordDebugBreakSlot(mode, call_argc); | 32 masm->RecordDebugBreakSlot(mode, call_argc); |
33 EmitDebugBreakSlot(masm); | 33 EmitDebugBreakSlot(masm); |
34 } | 34 } |
35 | 35 |
36 | 36 |
37 void DebugCodegen::ClearDebugBreakSlot(Address pc) { | 37 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
38 CodePatcher patcher(pc, Assembler::kDebugBreakSlotInstructions); | 38 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
39 EmitDebugBreakSlot(patcher.masm()); | 39 EmitDebugBreakSlot(patcher.masm()); |
40 } | 40 } |
41 | 41 |
42 | 42 |
43 void DebugCodegen::PatchDebugBreakSlot(Address pc, Handle<Code> code) { | 43 void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, |
| 44 Handle<Code> code) { |
44 DCHECK_EQ(Code::BUILTIN, code->kind()); | 45 DCHECK_EQ(Code::BUILTIN, code->kind()); |
45 CodePatcher patcher(pc, Assembler::kDebugBreakSlotInstructions); | 46 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
46 // Patch the code changing the debug break slot code from: | 47 // Patch the code changing the debug break slot code from: |
47 // nop(DEBUG_BREAK_NOP) - nop(1) is sll(zero_reg, zero_reg, 1) | 48 // nop(DEBUG_BREAK_NOP) - nop(1) is sll(zero_reg, zero_reg, 1) |
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 // to a call to the debug break slot code. | 52 // to a call to the debug break slot code. |
52 // li t9, address (lui t9 / ori t9 instruction pair) | 53 // li t9, address (lui t9 / ori t9 instruction pair) |
53 // call t9 (jalr t9 / nop instruction pair) | 54 // call t9 (jalr t9 / nop instruction pair) |
54 patcher.masm()->li(v8::internal::t9, | 55 patcher.masm()->li(v8::internal::t9, |
55 Operand(reinterpret_cast<int32_t>(code->entry()))); | 56 Operand(reinterpret_cast<int32_t>(code->entry()))); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 140 |
140 | 141 |
141 const bool LiveEdit::kFrameDropperSupported = true; | 142 const bool LiveEdit::kFrameDropperSupported = true; |
142 | 143 |
143 #undef __ | 144 #undef __ |
144 | 145 |
145 } // namespace internal | 146 } // namespace internal |
146 } // namespace v8 | 147 } // namespace v8 |
147 | 148 |
148 #endif // V8_TARGET_ARCH_MIPS | 149 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |