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

Unified Diff: src/ppc/assembler-ppc-inl.h

Issue 1237213002: PPC: Limit unbound label tracking to branch references. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
}
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698