Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: src/debug/mips/debug-mips.cc

Issue 1484893003: [debugger] simplify reloc info for debug break slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/ia32/debug-ia32.cc ('k') | src/debug/mips64/debug-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
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 trampoline pool in the debug break slot code. 29 // the trampoline pool in the debug break slot code.
31 Assembler::BlockTrampolinePoolScope block_pool(masm); 30 Assembler::BlockTrampolinePoolScope block_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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 139
141 140
142 const bool LiveEdit::kFrameDropperSupported = true; 141 const bool LiveEdit::kFrameDropperSupported = true;
143 142
144 #undef __ 143 #undef __
145 144
146 } // namespace internal 145 } // namespace internal
147 } // namespace v8 146 } // namespace v8
148 147
149 #endif // V8_TARGET_ARCH_MIPS 148 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/debug/ia32/debug-ia32.cc ('k') | src/debug/mips64/debug-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698