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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 rm_ = rm; 458 rm_ = rm;
459 rmode_ = kRelocInfo_NONEPTR; // PPC -why doesn't ARM do this? 459 rmode_ = kRelocInfo_NONEPTR; // PPC -why doesn't ARM do this?
460 } 460 }
461 461
462 void Assembler::CheckBuffer() { 462 void Assembler::CheckBuffer() {
463 if (buffer_space() <= kGap) { 463 if (buffer_space() <= kGap) {
464 GrowBuffer(); 464 GrowBuffer();
465 } 465 }
466 } 466 }
467 467
468 void Assembler::TrackBranch() {
469 DCHECK(!trampoline_emitted_);
470 int count = tracked_branch_count_++;
471 if (count == 0) {
472 // We leave space (kMaxBlockTrampolineSectionSize)
473 // for BlockTrampolinePoolScope buffer.
474 next_trampoline_check_ =
475 pc_offset() + kMaxCondBranchReach - kMaxBlockTrampolineSectionSize;
476 } else {
477 next_trampoline_check_ -= kTrampolineSlotsSize;
478 }
479 }
480
481 void Assembler::UntrackBranch() {
482 DCHECK(!trampoline_emitted_);
483 DCHECK(tracked_branch_count_ > 0);
484 int count = --tracked_branch_count_;
485 if (count == 0) {
486 // Reset
487 next_trampoline_check_ = kMaxInt;
488 } else {
489 next_trampoline_check_ += kTrampolineSlotsSize;
490 }
491 }
492
468 void Assembler::CheckTrampolinePoolQuick() { 493 void Assembler::CheckTrampolinePoolQuick() {
469 if (pc_offset() >= next_buffer_check_) { 494 if (pc_offset() >= next_trampoline_check_) {
470 CheckTrampolinePool(); 495 CheckTrampolinePool();
471 } 496 }
472 } 497 }
473 498
474 void Assembler::emit(Instr x) { 499 void Assembler::emit(Instr x) {
475 CheckBuffer(); 500 CheckBuffer();
476 *reinterpret_cast<Instr*>(pc_) = x; 501 *reinterpret_cast<Instr*>(pc_) = x;
477 pc_ += kInstrSize; 502 pc_ += kInstrSize;
478 CheckTrampolinePoolQuick(); 503 CheckTrampolinePoolQuick();
479 } 504 }
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 } 746 }
722 #endif 747 #endif
723 return; 748 return;
724 } 749 }
725 UNREACHABLE(); 750 UNREACHABLE();
726 } 751 }
727 } 752 }
728 } // namespace v8::internal 753 } // namespace v8::internal
729 754
730 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ 755 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_
OLDNEW
« 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