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

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

Issue 301633005: Merge Debugger and Debug. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm64/assembler-arm64.h » ('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 #include "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "codegen.h" 9 #include "codegen.h"
10 #include "debug.h" 10 #include "debug.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // jumping to the target address intended by the caller and that was 148 // jumping to the target address intended by the caller and that was
149 // overwritten by the address of DebugBreakXXX. 149 // overwritten by the address of DebugBreakXXX.
150 ExternalReference after_break_target = 150 ExternalReference after_break_target =
151 ExternalReference::debug_after_break_target_address(masm->isolate()); 151 ExternalReference::debug_after_break_target_address(masm->isolate());
152 __ mov(ip, Operand(after_break_target)); 152 __ mov(ip, Operand(after_break_target));
153 __ ldr(ip, MemOperand(ip)); 153 __ ldr(ip, MemOperand(ip));
154 __ Jump(ip); 154 __ Jump(ip);
155 } 155 }
156 156
157 157
158 void Debug::GenerateCallICStubDebugBreak(MacroAssembler* masm) { 158 void DebugCodegen::GenerateCallICStubDebugBreak(MacroAssembler* masm) {
159 // Register state for CallICStub 159 // Register state for CallICStub
160 // ----------- S t a t e ------------- 160 // ----------- S t a t e -------------
161 // -- r1 : function 161 // -- r1 : function
162 // -- r3 : slot in feedback array (smi) 162 // -- r3 : slot in feedback array (smi)
163 // ----------------------------------- 163 // -----------------------------------
164 Generate_DebugBreakCallHelper(masm, r1.bit() | r3.bit(), 0); 164 Generate_DebugBreakCallHelper(masm, r1.bit() | r3.bit(), 0);
165 } 165 }
166 166
167 167
168 void Debug::GenerateLoadICDebugBreak(MacroAssembler* masm) { 168 void DebugCodegen::GenerateLoadICDebugBreak(MacroAssembler* masm) {
169 // Calling convention for IC load (from ic-arm.cc). 169 // Calling convention for IC load (from ic-arm.cc).
170 // ----------- S t a t e ------------- 170 // ----------- S t a t e -------------
171 // -- r2 : name 171 // -- r2 : name
172 // -- lr : return address 172 // -- lr : return address
173 // -- r0 : receiver 173 // -- r0 : receiver
174 // -- [sp] : receiver 174 // -- [sp] : receiver
175 // ----------------------------------- 175 // -----------------------------------
176 // Registers r0 and r2 contain objects that need to be pushed on the 176 // Registers r0 and r2 contain objects that need to be pushed on the
177 // expression stack of the fake JS frame. 177 // expression stack of the fake JS frame.
178 Generate_DebugBreakCallHelper(masm, r0.bit() | r2.bit(), 0); 178 Generate_DebugBreakCallHelper(masm, r0.bit() | r2.bit(), 0);
179 } 179 }
180 180
181 181
182 void Debug::GenerateStoreICDebugBreak(MacroAssembler* masm) { 182 void DebugCodegen::GenerateStoreICDebugBreak(MacroAssembler* masm) {
183 // Calling convention for IC store (from ic-arm.cc). 183 // Calling convention for IC store (from ic-arm.cc).
184 // ----------- S t a t e ------------- 184 // ----------- S t a t e -------------
185 // -- r0 : value 185 // -- r0 : value
186 // -- r1 : receiver 186 // -- r1 : receiver
187 // -- r2 : name 187 // -- r2 : name
188 // -- lr : return address 188 // -- lr : return address
189 // ----------------------------------- 189 // -----------------------------------
190 // Registers r0, r1, and r2 contain objects that need to be pushed on the 190 // Registers r0, r1, and r2 contain objects that need to be pushed on the
191 // expression stack of the fake JS frame. 191 // expression stack of the fake JS frame.
192 Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit() | r2.bit(), 0); 192 Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit() | r2.bit(), 0);
193 } 193 }
194 194
195 195
196 void Debug::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) { 196 void DebugCodegen::GenerateKeyedLoadICDebugBreak(MacroAssembler* masm) {
197 // ---------- S t a t e -------------- 197 // ---------- S t a t e --------------
198 // -- lr : return address 198 // -- lr : return address
199 // -- r0 : key 199 // -- r0 : key
200 // -- r1 : receiver 200 // -- r1 : receiver
201 Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit(), 0); 201 Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit(), 0);
202 } 202 }
203 203
204 204
205 void Debug::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) { 205 void DebugCodegen::GenerateKeyedStoreICDebugBreak(MacroAssembler* masm) {
206 // ---------- S t a t e -------------- 206 // ---------- S t a t e --------------
207 // -- r0 : value 207 // -- r0 : value
208 // -- r1 : key 208 // -- r1 : key
209 // -- r2 : receiver 209 // -- r2 : receiver
210 // -- lr : return address 210 // -- lr : return address
211 Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit() | r2.bit(), 0); 211 Generate_DebugBreakCallHelper(masm, r0.bit() | r1.bit() | r2.bit(), 0);
212 } 212 }
213 213
214 214
215 void Debug::GenerateCompareNilICDebugBreak(MacroAssembler* masm) { 215 void DebugCodegen::GenerateCompareNilICDebugBreak(MacroAssembler* masm) {
216 // Register state for CompareNil IC 216 // Register state for CompareNil IC
217 // ----------- S t a t e ------------- 217 // ----------- S t a t e -------------
218 // -- r0 : value 218 // -- r0 : value
219 // ----------------------------------- 219 // -----------------------------------
220 Generate_DebugBreakCallHelper(masm, r0.bit(), 0); 220 Generate_DebugBreakCallHelper(masm, r0.bit(), 0);
221 } 221 }
222 222
223 223
224 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { 224 void DebugCodegen::GenerateReturnDebugBreak(MacroAssembler* masm) {
225 // In places other than IC call sites it is expected that r0 is TOS which 225 // In places other than IC call sites it is expected that r0 is TOS which
226 // is an object - this is not generally the case so this should be used with 226 // is an object - this is not generally the case so this should be used with
227 // care. 227 // care.
228 Generate_DebugBreakCallHelper(masm, r0.bit(), 0); 228 Generate_DebugBreakCallHelper(masm, r0.bit(), 0);
229 } 229 }
230 230
231 231
232 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { 232 void DebugCodegen::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) {
233 // Register state for CallFunctionStub (from code-stubs-arm.cc). 233 // Register state for CallFunctionStub (from code-stubs-arm.cc).
234 // ----------- S t a t e ------------- 234 // ----------- S t a t e -------------
235 // -- r1 : function 235 // -- r1 : function
236 // ----------------------------------- 236 // -----------------------------------
237 Generate_DebugBreakCallHelper(masm, r1.bit(), 0); 237 Generate_DebugBreakCallHelper(masm, r1.bit(), 0);
238 } 238 }
239 239
240 240
241 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { 241 void DebugCodegen::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) {
242 // Calling convention for CallConstructStub (from code-stubs-arm.cc) 242 // Calling convention for CallConstructStub (from code-stubs-arm.cc)
243 // ----------- S t a t e ------------- 243 // ----------- S t a t e -------------
244 // -- r0 : number of arguments (not smi) 244 // -- r0 : number of arguments (not smi)
245 // -- r1 : constructor function 245 // -- r1 : constructor function
246 // ----------------------------------- 246 // -----------------------------------
247 Generate_DebugBreakCallHelper(masm, r1.bit(), r0.bit()); 247 Generate_DebugBreakCallHelper(masm, r1.bit(), r0.bit());
248 } 248 }
249 249
250 250
251 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { 251 void DebugCodegen::GenerateCallConstructStubRecordDebugBreak(
252 MacroAssembler* masm) {
252 // Calling convention for CallConstructStub (from code-stubs-arm.cc) 253 // Calling convention for CallConstructStub (from code-stubs-arm.cc)
253 // ----------- S t a t e ------------- 254 // ----------- S t a t e -------------
254 // -- r0 : number of arguments (not smi) 255 // -- r0 : number of arguments (not smi)
255 // -- r1 : constructor function 256 // -- r1 : constructor function
256 // -- r2 : feedback array 257 // -- r2 : feedback array
257 // -- r3 : feedback slot (smi) 258 // -- r3 : feedback slot (smi)
258 // ----------------------------------- 259 // -----------------------------------
259 Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit() | r3.bit(), r0.bit()); 260 Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit() | r3.bit(), r0.bit());
260 } 261 }
261 262
262 263
263 void Debug::GenerateSlot(MacroAssembler* masm) { 264 void DebugCodegen::GenerateSlot(MacroAssembler* masm) {
264 // Generate enough nop's to make space for a call instruction. Avoid emitting 265 // Generate enough nop's to make space for a call instruction. Avoid emitting
265 // the constant pool in the debug break slot code. 266 // the constant pool in the debug break slot code.
266 Assembler::BlockConstPoolScope block_const_pool(masm); 267 Assembler::BlockConstPoolScope block_const_pool(masm);
267 Label check_codesize; 268 Label check_codesize;
268 __ bind(&check_codesize); 269 __ bind(&check_codesize);
269 __ RecordDebugBreakSlot(); 270 __ RecordDebugBreakSlot();
270 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { 271 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) {
271 __ nop(MacroAssembler::DEBUG_BREAK_NOP); 272 __ nop(MacroAssembler::DEBUG_BREAK_NOP);
272 } 273 }
273 ASSERT_EQ(Assembler::kDebugBreakSlotInstructions, 274 ASSERT_EQ(Assembler::kDebugBreakSlotInstructions,
274 masm->InstructionsGeneratedSince(&check_codesize)); 275 masm->InstructionsGeneratedSince(&check_codesize));
275 } 276 }
276 277
277 278
278 void Debug::GenerateSlotDebugBreak(MacroAssembler* masm) { 279 void DebugCodegen::GenerateSlotDebugBreak(MacroAssembler* masm) {
279 // In the places where a debug break slot is inserted no registers can contain 280 // In the places where a debug break slot is inserted no registers can contain
280 // object pointers. 281 // object pointers.
281 Generate_DebugBreakCallHelper(masm, 0, 0); 282 Generate_DebugBreakCallHelper(masm, 0, 0);
282 } 283 }
283 284
284 285
285 void Debug::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { 286 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) {
286 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnArm); 287 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnArm);
287 } 288 }
288 289
289 290
290 void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { 291 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
291 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnArm); 292 masm->Abort(kLiveEditFrameDroppingIsNotSupportedOnArm);
292 } 293 }
293 294
294 const bool Debug::kFrameDropperSupported = false; 295 const bool Debug::kFrameDropperSupported = false;
295 296
296 #undef __ 297 #undef __
297 298
298 } } // namespace v8::internal 299 } } // namespace v8::internal
299 300
300 #endif // V8_TARGET_ARCH_ARM 301 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm.h ('k') | src/arm64/assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698