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

Side by Side Diff: src/mips64/full-codegen-mips64.cc

Issue 1234833003: Debugger: use debug break slots to break at function exit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for arm Created 5 years, 5 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
« no previous file with comments | « src/mips64/debug-mips64.cc ('k') | src/mips64/macro-assembler-mips64.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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
8 8
9 // Note on Mips implementation: 9 // Note on Mips implementation:
10 // 10 //
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 EmitProfilingCounterDecrement(weight); 483 EmitProfilingCounterDecrement(weight);
484 Label ok; 484 Label ok;
485 __ Branch(&ok, ge, a3, Operand(zero_reg)); 485 __ Branch(&ok, ge, a3, Operand(zero_reg));
486 __ push(v0); 486 __ push(v0);
487 __ Call(isolate()->builtins()->InterruptCheck(), 487 __ Call(isolate()->builtins()->InterruptCheck(),
488 RelocInfo::CODE_TARGET); 488 RelocInfo::CODE_TARGET);
489 __ pop(v0); 489 __ pop(v0);
490 EmitProfilingCounterReset(); 490 EmitProfilingCounterReset();
491 __ bind(&ok); 491 __ bind(&ok);
492 492
493 #ifdef DEBUG
494 // Add a label for checking the size of the code used for returning.
495 Label check_exit_codesize;
496 masm_->bind(&check_exit_codesize);
497 #endif
498
499 // Make sure that the constant pool is not emitted inside of the return 493 // Make sure that the constant pool is not emitted inside of the return
500 // sequence. 494 // sequence.
501 { Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 495 { Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
502 // Here we use masm_-> instead of the __ macro to avoid the code coverage 496 // Here we use masm_-> instead of the __ macro to avoid the code coverage
503 // tool from instrumenting as we rely on the code size here. 497 // tool from instrumenting as we rely on the code size here.
504 int32_t arg_count = info_->scope()->num_parameters() + 1; 498 int32_t arg_count = info_->scope()->num_parameters() + 1;
505 int32_t sp_delta = arg_count * kPointerSize; 499 int32_t sp_delta = arg_count * kPointerSize;
506 SetReturnPosition(function()); 500 SetReturnPosition(function());
507 __ RecordJSReturn();
508 masm_->mov(sp, fp); 501 masm_->mov(sp, fp);
509 int no_frame_start = masm_->pc_offset(); 502 int no_frame_start = masm_->pc_offset();
510 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit())); 503 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit()));
511 masm_->Daddu(sp, sp, Operand(sp_delta)); 504 masm_->Daddu(sp, sp, Operand(sp_delta));
512 masm_->Jump(ra); 505 masm_->Jump(ra);
513 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 506 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
514 } 507 }
515
516 #ifdef DEBUG
517 // Check that the size of the code used for returning is large enough
518 // for the debugger's requirements.
519 DCHECK(Assembler::kJSReturnSequenceInstructions <=
520 masm_->InstructionsGeneratedSince(&check_exit_codesize));
521 #endif
522 } 508 }
523 } 509 }
524 510
525 511
526 void FullCodeGenerator::EffectContext::Plug(Variable* var) const { 512 void FullCodeGenerator::EffectContext::Plug(Variable* var) const {
527 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 513 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
528 } 514 }
529 515
530 516
531 void FullCodeGenerator::AccumulatorValueContext::Plug(Variable* var) const { 517 void FullCodeGenerator::AccumulatorValueContext::Plug(Variable* var) const {
(...skipping 5058 matching lines...) Expand 10 before | Expand all | Expand 10 after
5590 reinterpret_cast<uint64_t>( 5576 reinterpret_cast<uint64_t>(
5591 isolate->builtins()->OsrAfterStackCheck()->entry())); 5577 isolate->builtins()->OsrAfterStackCheck()->entry()));
5592 return OSR_AFTER_STACK_CHECK; 5578 return OSR_AFTER_STACK_CHECK;
5593 } 5579 }
5594 5580
5595 5581
5596 } // namespace internal 5582 } // namespace internal
5597 } // namespace v8 5583 } // namespace v8
5598 5584
5599 #endif // V8_TARGET_ARCH_MIPS64 5585 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/debug-mips64.cc ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698