| Index: src/ppc/assembler-ppc-inl.h
|
| diff --git a/src/ppc/assembler-ppc-inl.h b/src/ppc/assembler-ppc-inl.h
|
| index d6302d43474722a4f15aab29ad3c453e68f7840e..74eb0c3ddd8a3e2daba7e5a050ae767b90ee815c 100644
|
| --- a/src/ppc/assembler-ppc-inl.h
|
| +++ b/src/ppc/assembler-ppc-inl.h
|
| @@ -465,8 +465,33 @@ void Assembler::CheckBuffer() {
|
| }
|
| }
|
|
|
| +void Assembler::TrackBranch() {
|
| + DCHECK(!trampoline_emitted_);
|
| + int count = tracked_branch_count_++;
|
| + if (count == 0) {
|
| + // We leave space (kMaxBlockTrampolineSectionSize)
|
| + // for BlockTrampolinePoolScope buffer.
|
| + next_trampoline_check_ =
|
| + pc_offset() + kMaxCondBranchReach - kMaxBlockTrampolineSectionSize;
|
| + } else {
|
| + next_trampoline_check_ -= kTrampolineSlotsSize;
|
| + }
|
| +}
|
| +
|
| +void Assembler::UntrackBranch() {
|
| + DCHECK(!trampoline_emitted_);
|
| + DCHECK(tracked_branch_count_ > 0);
|
| + int count = --tracked_branch_count_;
|
| + if (count == 0) {
|
| + // Reset
|
| + next_trampoline_check_ = kMaxInt;
|
| + } else {
|
| + next_trampoline_check_ += kTrampolineSlotsSize;
|
| + }
|
| +}
|
| +
|
| void Assembler::CheckTrampolinePoolQuick() {
|
| - if (pc_offset() >= next_buffer_check_) {
|
| + if (pc_offset() >= next_trampoline_check_) {
|
| CheckTrampolinePool();
|
| }
|
| }
|
|
|