| 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..cdc73741c320ff23ac5b5629c7843590b38dcfe5 100644
|
| --- a/src/mips/assembler-mips-inl.h
|
| +++ b/src/mips/assembler-mips-inl.h
|
| @@ -445,12 +445,24 @@ void Assembler::CheckTrampolinePoolQuick(int extra_instructions) {
|
| }
|
|
|
|
|
| -void Assembler::emit(Instr x) {
|
| +void Assembler::emit(Instr x, CompactBranchType is_compact_branch) {
|
| if (!is_buffer_growth_blocked()) {
|
| CheckBuffer();
|
| }
|
| + if (IsPrevInstrCompactBranch()) {
|
| + if (Instruction::IsForbiddenAfterBranchInstr(x)) {
|
| + // 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;
|
| + if (is_compact_branch == CompactBranchType::COMPACT_BRANCH) {
|
| + EmittedCompactBranchInstruction();
|
| + }
|
| CheckTrampolinePoolQuick();
|
| }
|
|
|
|
|