| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index fa2e813bba0edf7dc3103bc8887de3ff21c4f9b0..98b1da7484f3e2a3b545618b59c8f1406742cee5 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -4452,36 +4452,37 @@ void MacroAssembler::LoadGlobalFunctionInitialMap(Register function,
|
| }
|
|
|
|
|
| -void MacroAssembler::Prologue(CompilationInfo* info) {
|
| - if (info->IsStub()) {
|
| +void MacroAssembler::StubPrologue() {
|
| Push(ra, fp, cp);
|
| Push(Smi::FromInt(StackFrame::STUB));
|
| // Adjust FP to point to saved FP.
|
| Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| - } else {
|
| - PredictableCodeSizeScope predictible_code_size_scope(
|
| +}
|
| +
|
| +
|
| +void MacroAssembler::Prologue(bool code_pre_aging) {
|
| + PredictableCodeSizeScope predictible_code_size_scope(
|
| this, kNoCodeAgeSequenceLength);
|
| - // The following three instructions must remain together and unmodified
|
| - // for code aging to work properly.
|
| - if (info->IsCodePreAgingActive()) {
|
| - // Pre-age the code.
|
| - Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
|
| - nop(Assembler::CODE_AGE_MARKER_NOP);
|
| - // Load the stub address to t9 and call it,
|
| - // GetCodeAgeAndParity() extracts the stub address from this instruction.
|
| - li(t9,
|
| - Operand(reinterpret_cast<uint32_t>(stub->instruction_start())),
|
| - CONSTANT_SIZE);
|
| - nop(); // Prevent jalr to jal optimization.
|
| - jalr(t9, a0);
|
| - nop(); // Branch delay slot nop.
|
| - nop(); // Pad the empty space.
|
| - } else {
|
| - Push(ra, fp, cp, a1);
|
| - nop(Assembler::CODE_AGE_SEQUENCE_NOP);
|
| - // Adjust fp to point to caller's fp.
|
| - Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| - }
|
| + // The following three instructions must remain together and unmodified
|
| + // for code aging to work properly.
|
| + if (code_pre_aging) {
|
| + // Pre-age the code.
|
| + Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
|
| + nop(Assembler::CODE_AGE_MARKER_NOP);
|
| + // Load the stub address to t9 and call it,
|
| + // GetCodeAgeAndParity() extracts the stub address from this instruction.
|
| + li(t9,
|
| + Operand(reinterpret_cast<uint32_t>(stub->instruction_start())),
|
| + CONSTANT_SIZE);
|
| + nop(); // Prevent jalr to jal optimization.
|
| + jalr(t9, a0);
|
| + nop(); // Branch delay slot nop.
|
| + nop(); // Pad the empty space.
|
| + } else {
|
| + Push(ra, fp, cp, a1);
|
| + nop(Assembler::CODE_AGE_SEQUENCE_NOP);
|
| + // Adjust fp to point to caller's fp.
|
| + Addu(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
|
| }
|
| }
|
|
|
|
|