| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { | 237 void Debug::GenerateCallICDebugBreak(MacroAssembler* masm) { |
| 238 // Calling convention for IC call (from ic-mips.cc). | 238 // Calling convention for IC call (from ic-mips.cc). |
| 239 // ----------- S t a t e ------------- | 239 // ----------- S t a t e ------------- |
| 240 // -- a2: name | 240 // -- a2: name |
| 241 // ----------------------------------- | 241 // ----------------------------------- |
| 242 Generate_DebugBreakCallHelper(masm, a2.bit(), 0); | 242 Generate_DebugBreakCallHelper(masm, a2.bit(), 0); |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 void Debug::GenerateConstructCallDebugBreak(MacroAssembler* masm) { | |
| 247 // Calling convention for construct call (from builtins-mips.cc). | |
| 248 // -- a0 : number of arguments (not smi) | |
| 249 // -- a1 : constructor function | |
| 250 // -- a2 : cache cell for call target | |
| 251 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit(), a0.bit()); | |
| 252 } | |
| 253 | |
| 254 | |
| 255 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { | 246 void Debug::GenerateReturnDebugBreak(MacroAssembler* masm) { |
| 256 // In places other than IC call sites it is expected that v0 is TOS which | 247 // In places other than IC call sites it is expected that v0 is TOS which |
| 257 // is an object - this is not generally the case so this should be used with | 248 // is an object - this is not generally the case so this should be used with |
| 258 // care. | 249 // care. |
| 259 Generate_DebugBreakCallHelper(masm, v0.bit(), 0); | 250 Generate_DebugBreakCallHelper(masm, v0.bit(), 0); |
| 260 } | 251 } |
| 261 | 252 |
| 262 | 253 |
| 263 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { | 254 void Debug::GenerateCallFunctionStubDebugBreak(MacroAssembler* masm) { |
| 264 // Register state for CallFunctionStub (from code-stubs-mips.cc). | 255 // Register state for CallFunctionStub (from code-stubs-mips.cc). |
| 265 // ----------- S t a t e ------------- | 256 // ----------- S t a t e ------------- |
| 266 // -- a1 : function | 257 // -- a1 : function |
| 267 // ----------------------------------- | 258 // ----------------------------------- |
| 268 Generate_DebugBreakCallHelper(masm, a1.bit(), 0); | 259 Generate_DebugBreakCallHelper(masm, a1.bit(), 0); |
| 269 } | 260 } |
| 270 | 261 |
| 271 | 262 |
| 263 void Debug::GenerateCallFunctionStubRecordDebugBreak(MacroAssembler* masm) { |
| 264 // Register state for CallFunctionStub (from code-stubs-mips.cc). |
| 265 // ----------- S t a t e ------------- |
| 266 // -- a1 : function |
| 267 // -- a2 : cache cell for call target |
| 268 // ----------------------------------- |
| 269 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit(), 0); |
| 270 } |
| 271 |
| 272 |
| 273 void Debug::GenerateCallConstructStubDebugBreak(MacroAssembler* masm) { |
| 274 // Calling convention for CallConstructStub (from code-stubs-mips.cc). |
| 275 // ----------- S t a t e ------------- |
| 276 // -- a0 : number of arguments (not smi) |
| 277 // -- a1 : constructor function |
| 278 // ----------------------------------- |
| 279 Generate_DebugBreakCallHelper(masm, a1.bit() , a0.bit()); |
| 280 } |
| 281 |
| 282 |
| 283 void Debug::GenerateCallConstructStubRecordDebugBreak(MacroAssembler* masm) { |
| 284 // Calling convention for CallConstructStub (from code-stubs-mips.cc). |
| 285 // ----------- S t a t e ------------- |
| 286 // -- a0 : number of arguments (not smi) |
| 287 // -- a1 : constructor function |
| 288 // -- a2 : cache cell for call target |
| 289 // ----------------------------------- |
| 290 Generate_DebugBreakCallHelper(masm, a1.bit() | a2.bit(), a0.bit()); |
| 291 } |
| 292 |
| 293 |
| 272 void Debug::GenerateSlot(MacroAssembler* masm) { | 294 void Debug::GenerateSlot(MacroAssembler* masm) { |
| 273 // Generate enough nop's to make space for a call instruction. Avoid emitting | 295 // Generate enough nop's to make space for a call instruction. Avoid emitting |
| 274 // the trampoline pool in the debug break slot code. | 296 // the trampoline pool in the debug break slot code. |
| 275 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm); | 297 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm); |
| 276 Label check_codesize; | 298 Label check_codesize; |
| 277 __ bind(&check_codesize); | 299 __ bind(&check_codesize); |
| 278 __ RecordDebugBreakSlot(); | 300 __ RecordDebugBreakSlot(); |
| 279 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { | 301 for (int i = 0; i < Assembler::kDebugBreakSlotInstructions; i++) { |
| 280 __ nop(MacroAssembler::DEBUG_BREAK_NOP); | 302 __ nop(MacroAssembler::DEBUG_BREAK_NOP); |
| 281 } | 303 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 304 const bool Debug::kFrameDropperSupported = false; | 326 const bool Debug::kFrameDropperSupported = false; |
| 305 | 327 |
| 306 #undef __ | 328 #undef __ |
| 307 | 329 |
| 308 | 330 |
| 309 #endif // ENABLE_DEBUGGER_SUPPORT | 331 #endif // ENABLE_DEBUGGER_SUPPORT |
| 310 | 332 |
| 311 } } // namespace v8::internal | 333 } } // namespace v8::internal |
| 312 | 334 |
| 313 #endif // V8_TARGET_ARCH_MIPS | 335 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |