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

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

Issue 1396133002: MIPS: r6 compact branch optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased, gcc build fixed, ra alignment failure fixed. Created 5 years, 2 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
Index: src/mips/assembler-mips-inl.h
diff --git a/src/mips/assembler-mips-inl.h b/src/mips/assembler-mips-inl.h
index 0d4576d85cf2881b3c98208521f652e4d5fbf31f..a27e43e6d555330bbca35b956aff1d4374bac09c 100644
--- a/src/mips/assembler-mips-inl.h
+++ b/src/mips/assembler-mips-inl.h
@@ -449,6 +449,17 @@ void Assembler::emit(Instr x) {
if (!is_buffer_growth_blocked()) {
CheckBuffer();
}
+ if (IsPrevInstrCompactBranch()) {
+ BlockTrampolinePoolFor(1); // For saving forbidden slot.
paul.l... 2015/10/15 01:51:24 Doesn't this BlockTrampolinePoolFor(1) come too la
balazs.kilvady 2015/10/30 21:11:14 Done.
+ if (Instruction::At(reinterpret_cast<byte*>(&x))
+ ->IsForbiddenInBranchDelay()) {
paul.l... 2015/10/15 01:51:24 I think the use of 'Delay' in this name is mis-lea
balazs.kilvady 2015/10/30 21:11:14 Done.
+ // Nop instruction to preceed a CTI in forbidden slot:
+ Instr nop = SPECIAL | SLL;
+ *reinterpret_cast<Instr*>(pc_) = nop;
+ pc_ += kInstrSize;
+ }
+ ClearCompactBranchState();
+ }
*reinterpret_cast<Instr*>(pc_) = x;
pc_ += kInstrSize;
CheckTrampolinePoolQuick();

Powered by Google App Engine
This is Rietveld 408576698