OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { | 245 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { |
246 // Calling convention for IC call (from ic-arm.cc) | 246 // Calling convention for IC call (from ic-arm.cc) |
247 // ----------- S t a t e ------------- | 247 // ----------- S t a t e ------------- |
248 // -- r2 : name | 248 // -- r2 : name |
249 // ----------------------------------- | 249 // ----------------------------------- |
250 Generate_DebugBreakCallHelper(masm, r2.bit(), 0); | 250 Generate_DebugBreakCallHelper(masm, r2.bit(), 0); |
251 } | 251 } |
252 | 252 |
253 | 253 |
254 void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) { | |
255 // Calling convention for construct call (from builtins-arm.cc) | |
256 // -- r0 : number of arguments (not smi) | |
257 // -- r1 : constructor function | |
258 // -- r2 : cache cell for call target | |
259 Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit(), r0.bit()); | |
260 } | |
261 | |
262 | |
263 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 254 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
264 // In places other than IC call sites it is expected that r0 is TOS which | 255 // In places other than IC call sites it is expected that r0 is TOS which |
265 // is an object - this is not generally the case so this should be used with | 256 // is an object - this is not generally the case so this should be used with |
266 // care. | 257 // care. |
267 Generate_DebugBreakCallHelper(masm, r0.bit(), 0); | 258 Generate_DebugBreakCallHelper(masm, r0.bit(), 0); |
268 } | 259 } |
269 | 260 |
270 | 261 |
271 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 262 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
272 // Register state for CallFunctionStub (from code-stubs-arm.cc). | 263 // Register state for CallFunctionStub (from code-stubs-arm.cc). |
273 // ----------- S t a t e ------------- | 264 // ----------- S t a t e ------------- |
274 // -- r1 : function | 265 // -- r1 : function |
275 // ----------------------------------- | 266 // ----------------------------------- |
276 Generate_DebugBreakCallHelper(masm, r1.bit(), 0); | 267 Generate_DebugBreakCallHelper(masm, r1.bit(), 0); |
277 } | 268 } |
278 | 269 |
279 | 270 |
| 271 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { |
| 272 // Register state for CallFunctionStub (from code-stubs-arm.cc). |
| 273 // ----------- S t a t e ------------- |
| 274 // -- r1 : function |
| 275 // -- r2 : cache cell for call target |
| 276 // ----------------------------------- |
| 277 Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit(), 0); |
| 278 } |
| 279 |
| 280 |
| 281 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
| 282 // Calling convention for CallConstructStub (from code-stubs-arm.cc) |
| 283 // ----------- S t a t e ------------- |
| 284 // -- r0 : number of arguments (not smi) |
| 285 // -- r1 : constructor function |
| 286 // ----------------------------------- |
| 287 Generate_DebugBreakCallHelper(masm, r1.bit(), r0.bit()); |
| 288 } |
| 289 |
| 290 |
| 291 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { |
| 292 // Calling convention for CallConstructStub (from code-stubs-arm.cc) |
| 293 // ----------- S t a t e ------------- |
| 294 // -- r0 : number of arguments (not smi) |
| 295 // -- r1 : constructor function |
| 296 // -- r2 : cache cell for call target |
| 297 // ----------------------------------- |
| 298 Generate_DebugBreakCallHelper(masm, r1.bit() | r2.bit(), r0.bit()); |
| 299 } |
| 300 |
| 301 |
280 void Debug::GenerateSlot(MacroAssembler* masm) { | 302 void Debug::GenerateSlot(MacroAssembler* masm) { |
281 // Generate enough nop's to make space for a call instruction. Avoid emitting | 303 // Generate enough nop's to make space for a call instruction. Avoid emitting |
282 // the constant pool in the debug break slot code. | 304 // the constant pool in the debug break slot code. |
283 Assembler::BlockConstPoolScope block_const_pool(masm); | 305 Assembler::BlockConstPoolScope block_const_pool(masm); |
284 Label check_codesize; | 306 Label check_codesize; |
285 __ bind(&check_codesize); | 307 __ bind(&check_codesize); |
286 __ RecordDebugBreakSlot(); | 308 __ RecordDebugBreakSlot(); |
287 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { | 309 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
288 __ nop(MacroAssembler::DEBUG_BREAK_NOP); | 310 __ nop(MacroAssembler::DEBUG_BREAK_NOP); |
289 } | 311 } |
(...skipping 22 matching lines...) Expand all Loading... |
312 | 334 |
313 #undef __ | 335 #undef __ |
314 | 336 |
315 | 337 |
316 | 338 |
317 #endif // ENABLE_DEBUGGER_SUPPORT | 339 #endif // ENABLE_DEBUGGER_SUPPORT |
318 | 340 |
319 } } // namespace v8::internal | 341 } } // namespace v8::internal |
320 | 342 |
321 #endif // V8_TARGET_ARCH_ARM | 343 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |