| 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 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 #define __ ACCESS_MASM(masm) | 14 #define __ ACCESS_MASM(masm) |
| 15 | 15 |
| 16 | 16 |
| 17 void EmitDebugBreakSlot(Assembler* masm) { | 17 void EmitDebugBreakSlot(Assembler* masm) { |
| 18 Label check_size; | 18 Label check_size; |
| 19 __ bind(&check_size); | 19 __ bind(&check_size); |
| 20 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { | 20 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
| 21 __ nop(Assembler::DEBUG_BREAK_NOP); | 21 __ nop(Assembler::DEBUG_BREAK_NOP); |
| 22 } | 22 } |
| 23 DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, | 23 DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, |
| 24 static_cast<int>(masm->InstructionsGeneratedSince(&check_size))); | 24 static_cast<int>(masm->InstructionsGeneratedSince(&check_size))); |
| 25 } | 25 } |
| 26 | 26 |
| 27 | 27 |
| 28 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 28 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { |
| 29 int call_argc) { | |
| 30 // 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 |
| 31 // the constant pool in the debug break slot code. | 30 // the constant pool in the debug break slot code. |
| 32 InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions); | 31 InstructionAccurateScope scope(masm, Assembler::kDebugBreakSlotInstructions); |
| 33 masm->RecordDebugBreakSlot(mode, call_argc); | 32 masm->RecordDebugBreakSlot(mode); |
| 34 EmitDebugBreakSlot(masm); | 33 EmitDebugBreakSlot(masm); |
| 35 } | 34 } |
| 36 | 35 |
| 37 | 36 |
| 38 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { | 37 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
| 39 PatchingAssembler patcher(isolate, reinterpret_cast<Instruction*>(pc), | 38 PatchingAssembler patcher(isolate, reinterpret_cast<Instruction*>(pc), |
| 40 Assembler::kDebugBreakSlotInstructions); | 39 Assembler::kDebugBreakSlotInstructions); |
| 41 EmitDebugBreakSlot(&patcher); | 40 EmitDebugBreakSlot(&patcher); |
| 42 } | 41 } |
| 43 | 42 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 __ Br(scratch); | 157 __ Br(scratch); |
| 159 } | 158 } |
| 160 | 159 |
| 161 | 160 |
| 162 const bool LiveEdit::kFrameDropperSupported = true; | 161 const bool LiveEdit::kFrameDropperSupported = true; |
| 163 | 162 |
| 164 } // namespace internal | 163 } // namespace internal |
| 165 } // namespace v8 | 164 } // namespace v8 |
| 166 | 165 |
| 167 #endif // V8_TARGET_ARCH_ARM64 | 166 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |