| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 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 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 #define __ ACCESS_MASM(masm) | 13 #define __ ACCESS_MASM(masm) |
| 14 | 14 |
| 15 | 15 |
| 16 void EmitDebugBreakSlot(MacroAssembler* masm) { | 16 void EmitDebugBreakSlot(MacroAssembler* masm) { |
| 17 Label check_size; | 17 Label check_size; |
| 18 __ bind(&check_size); | 18 __ bind(&check_size); |
| 19 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { | 19 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
| 20 __ nop(MacroAssembler::DEBUG_BREAK_NOP); | 20 __ nop(MacroAssembler::DEBUG_BREAK_NOP); |
| 21 } | 21 } |
| 22 DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, | 22 DCHECK_EQ(Assembler::kDebugBreakSlotInstructions, |
| 23 masm->InstructionsGeneratedSince(&check_size)); | 23 masm->InstructionsGeneratedSince(&check_size)); |
| 24 } | 24 } |
| 25 | 25 |
| 26 | 26 |
| 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode, | 27 void DebugCodegen::GenerateSlot(MacroAssembler* masm, RelocInfo::Mode mode) { |
| 28 int call_argc) { | |
| 29 // 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 |
| 30 // the constant pool in the debug break slot code. | 29 // the constant pool in the debug break slot code. |
| 31 Assembler::BlockConstPoolScope block_const_pool(masm); | 30 Assembler::BlockConstPoolScope block_const_pool(masm); |
| 32 masm->RecordDebugBreakSlot(mode, call_argc); | 31 masm->RecordDebugBreakSlot(mode); |
| 33 EmitDebugBreakSlot(masm); | 32 EmitDebugBreakSlot(masm); |
| 34 } | 33 } |
| 35 | 34 |
| 36 | 35 |
| 37 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { | 36 void DebugCodegen::ClearDebugBreakSlot(Isolate* isolate, Address pc) { |
| 38 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); | 37 CodePatcher patcher(isolate, pc, Assembler::kDebugBreakSlotInstructions); |
| 39 EmitDebugBreakSlot(patcher.masm()); | 38 EmitDebugBreakSlot(patcher.masm()); |
| 40 } | 39 } |
| 41 | 40 |
| 42 | 41 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 150 |
| 152 | 151 |
| 153 const bool LiveEdit::kFrameDropperSupported = true; | 152 const bool LiveEdit::kFrameDropperSupported = true; |
| 154 | 153 |
| 155 #undef __ | 154 #undef __ |
| 156 | 155 |
| 157 } // namespace internal | 156 } // namespace internal |
| 158 } // namespace v8 | 157 } // namespace v8 |
| 159 | 158 |
| 160 #endif // V8_TARGET_ARCH_ARM | 159 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |