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

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

Issue 1238503003: PPC: Debugger: use debug break slots to break at function exit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/ppc/debug-ppc.cc ('k') | src/ppc/macro-assembler-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 EmitProfilingCounterDecrement(weight); 484 EmitProfilingCounterDecrement(weight);
485 Label ok; 485 Label ok;
486 __ cmpi(r6, Operand::Zero()); 486 __ cmpi(r6, Operand::Zero());
487 __ bge(&ok); 487 __ bge(&ok);
488 __ push(r3); 488 __ push(r3);
489 __ Call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); 489 __ Call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET);
490 __ pop(r3); 490 __ pop(r3);
491 EmitProfilingCounterReset(); 491 EmitProfilingCounterReset();
492 __ bind(&ok); 492 __ bind(&ok);
493 493
494 #ifdef DEBUG
495 // Add a label for checking the size of the code used for returning.
496 Label check_exit_codesize;
497 __ bind(&check_exit_codesize);
498 #endif
499 // Make sure that the constant pool is not emitted inside of the return 494 // Make sure that the constant pool is not emitted inside of the return
500 // sequence. 495 // sequence.
501 { 496 {
502 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); 497 Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_);
503 int32_t arg_count = info_->scope()->num_parameters() + 1; 498 int32_t arg_count = info_->scope()->num_parameters() + 1;
504 int32_t sp_delta = arg_count * kPointerSize; 499 int32_t sp_delta = arg_count * kPointerSize;
505 SetReturnPosition(function()); 500 SetReturnPosition(function());
506 __ RecordJSReturn();
507 int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta); 501 int no_frame_start = __ LeaveFrame(StackFrame::JAVA_SCRIPT, sp_delta);
508 #if V8_TARGET_ARCH_PPC64
509 // With 64bit we may need nop() instructions to ensure we have
510 // enough space to SetDebugBreakAtReturn()
511 if (is_int16(sp_delta)) {
512 if (!FLAG_enable_embedded_constant_pool) masm_->nop();
513 masm_->nop();
514 }
515 #endif
516 __ blr(); 502 __ blr();
517 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); 503 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset());
518 } 504 }
519
520 #ifdef DEBUG
521 // Check that the size of the code used for returning is large enough
522 // for the debugger's requirements.
523 DCHECK(Assembler::kJSReturnSequenceInstructions <=
524 masm_->InstructionsGeneratedSince(&check_exit_codesize));
525 #endif
526 } 505 }
527 } 506 }
528 507
529 508
530 void FullCodeGenerator::EffectContext::Plug(Variable* var) const { 509 void FullCodeGenerator::EffectContext::Plug(Variable* var) const {
531 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); 510 DCHECK(var->IsStackAllocated() || var->IsContextSlot());
532 } 511 }
533 512
534 513
535 void FullCodeGenerator::AccumulatorValueContext::Plug(Variable* var) const { 514 void FullCodeGenerator::AccumulatorValueContext::Plug(Variable* var) const {
(...skipping 5063 matching lines...) Expand 10 before | Expand all | Expand 10 after
5599 return ON_STACK_REPLACEMENT; 5578 return ON_STACK_REPLACEMENT;
5600 } 5579 }
5601 5580
5602 DCHECK(interrupt_address == 5581 DCHECK(interrupt_address ==
5603 isolate->builtins()->OsrAfterStackCheck()->entry()); 5582 isolate->builtins()->OsrAfterStackCheck()->entry());
5604 return OSR_AFTER_STACK_CHECK; 5583 return OSR_AFTER_STACK_CHECK;
5605 } 5584 }
5606 } // namespace internal 5585 } // namespace internal
5607 } // namespace v8 5586 } // namespace v8
5608 #endif // V8_TARGET_ARCH_PPC 5587 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/debug-ppc.cc ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698