| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // nop(DEBUG_BREAK_NOP) | 49 // nop(DEBUG_BREAK_NOP) |
| 50 // nop(DEBUG_BREAK_NOP) | 50 // nop(DEBUG_BREAK_NOP) |
| 51 // to a call to the debug break slot code. | 51 // to a call to the debug break slot code. |
| 52 // li t9, address (lui t9 / ori t9 instruction pair) | 52 // li t9, address (lui t9 / ori t9 instruction pair) |
| 53 // call t9 (jalr t9 / nop instruction pair) | 53 // call t9 (jalr t9 / nop instruction pair) |
| 54 patcher.masm()->li(v8::internal::t9, | 54 patcher.masm()->li(v8::internal::t9, |
| 55 Operand(reinterpret_cast<int32_t>(code->entry()))); | 55 Operand(reinterpret_cast<int32_t>(code->entry()))); |
| 56 patcher.masm()->Call(v8::internal::t9); | 56 patcher.masm()->Call(v8::internal::t9); |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool DebugCodegen::DebugBreakSlotIsPatched(Address pc) { |
| 60 Instr current_instr = Assembler::instr_at(pc); |
| 61 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP); |
| 62 } |
| 59 | 63 |
| 60 void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm, | 64 void DebugCodegen::GenerateDebugBreakStub(MacroAssembler* masm, |
| 61 DebugBreakCallHelperMode mode) { | 65 DebugBreakCallHelperMode mode) { |
| 62 __ RecordComment("Debug break"); | 66 __ RecordComment("Debug break"); |
| 63 { | 67 { |
| 64 FrameScope scope(masm, StackFrame::INTERNAL); | 68 FrameScope scope(masm, StackFrame::INTERNAL); |
| 65 | 69 |
| 66 // Load padding words on stack. | 70 // Load padding words on stack. |
| 67 __ li(at, Operand(Smi::FromInt(LiveEdit::kFramePaddingValue))); | 71 __ li(at, Operand(Smi::FromInt(LiveEdit::kFramePaddingValue))); |
| 68 __ Subu(sp, sp, | 72 __ Subu(sp, sp, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 138 |
| 135 | 139 |
| 136 const bool LiveEdit::kFrameDropperSupported = true; | 140 const bool LiveEdit::kFrameDropperSupported = true; |
| 137 | 141 |
| 138 #undef __ | 142 #undef __ |
| 139 | 143 |
| 140 } // namespace internal | 144 } // namespace internal |
| 141 } // namespace v8 | 145 } // namespace v8 |
| 142 | 146 |
| 143 #endif // V8_TARGET_ARCH_MIPS | 147 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |