| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 28 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, |
| 29 int call_argc) { | 29 int call_argc) { |
| 30 // Generate enough nop's to make space for a call instruction. Avoid emitting | 30 // Generate enough nop's to make space for a call instruction. Avoid emitting |
| 31 // the constant pool in the debug break slot code. | 31 // the constant pool in the debug break slot code. |
| 32 InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions); | 32 InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions); |
| 33 masm->RecordDebugBreakSlot(mode, call_argc); | 33 masm->RecordDebugBreakSlot(mode, call_argc); |
| 34 EmitDebugBreakSlot(masm); | 34 EmitDebugBreakSlot(masm); |
| 35 } | 35 } |
| 36 | 36 |
| 37 | 37 |
| 38 void DebugCodegen::ClearDebugBreakSlot(Address pc) { | 38 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
| 39 PatchingAssembler patcher(reinterpret_cast<Instruction*>(pc), | 39 PatchingAssembler patcher(isolate, reinterpret_cast<Instruction*>(pc), |
| 40 Assembler::kDebugBreakSlotInstructions); | 40 Assembler::kDebugBreakSlotInstructions); |
| 41 EmitDebugBreakSlot(&patcher); | 41 EmitDebugBreakSlot(&patcher); |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 void DebugCodegen::PatchDebugBreakSlot(Address pc, Handle<Code> code) { | 45 void DebugCodegen::PatchDebugBreakSlot(Isolate* isolate, Address pc, |
| 46 Handle<Code> code) { |
| 46 DCHECK_EQ(Code::BUILTIN, code->kind()); | 47 DCHECK_EQ(Code::BUILTIN, code->kind()); |
| 47 PatchingAssembler patcher(reinterpret_cast<Instruction*>(pc), | 48 PatchingAssembler patcher(isolate, reinterpret_cast<Instruction*>(pc), |
| 48 Assembler::kDebugBreakSlotInstructions); | 49 Assembler::kDebugBreakSlotInstructions); |
| 49 // Patch the code emitted by DebugCodegen::GenerateSlots, changing the debug | 50 // Patch the code emitted by DebugCodegen::GenerateSlots, changing the debug |
| 50 // break slot code from | 51 // break slot code from |
| 51 // mov x0, x0 @ nop DEBUG_BREAK_NOP | 52 // mov x0, x0 @ nop DEBUG_BREAK_NOP |
| 52 // mov x0, x0 @ nop DEBUG_BREAK_NOP | 53 // mov x0, x0 @ nop DEBUG_BREAK_NOP |
| 53 // mov x0, x0 @ nop DEBUG_BREAK_NOP | 54 // mov x0, x0 @ nop DEBUG_BREAK_NOP |
| 54 // mov x0, x0 @ nop DEBUG_BREAK_NOP | 55 // mov x0, x0 @ nop DEBUG_BREAK_NOP |
| 55 // mov x0, x0 @ nop DEBUG_BREAK_NOP | 56 // mov x0, x0 @ nop DEBUG_BREAK_NOP |
| 56 // to a call to the debug slot code. | 57 // to a call to the debug slot code. |
| 57 // ldr ip0, [pc, #(2 * kInstructionSize)] | 58 // ldr ip0, [pc, #(2 * kInstructionSize)] |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 __ Br(scratch); | 158 __ Br(scratch); |
| 158 } | 159 } |
| 159 | 160 |
| 160 | 161 |
| 161 const bool LiveEdit::kFrameDropperSupported = true; | 162 const bool LiveEdit::kFrameDropperSupported = true; |
| 162 | 163 |
| 163 } // namespace internal | 164 } // namespace internal |
| 164 } // namespace v8 | 165 } // namespace v8 |
| 165 | 166 |
| 166 #endif // V8_TARGET_ARCH_ARM64 | 167 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |