| Index: src/mips/macro-assembler-mips.cc
|
| diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
|
| index f554b0c1efc84757d5edc7bd2923272dc1522598..8ca73e60e6cc9ab26736ffd5484e3e553a441853 100644
|
| --- a/src/mips/macro-assembler-mips.cc
|
| +++ b/src/mips/macro-assembler-mips.cc
|
| @@ -4892,8 +4892,9 @@ void MacroAssembler::Prologue(bool code_pre_aging) {
|
| li(t9,
|
| Operand(reinterpret_cast<uint32_t>(stub->instruction_start())),
|
| CONSTANT_SIZE);
|
| - nop(); // Prevent jalr to jal optimization.
|
| - jalr(t9, a0);
|
| + // Save the function's original return address.
|
| + mov(at, ra); // This also prevents jalr->jal optimization.
|
| + jalr(t9);
|
| nop(); // Branch delay slot nop.
|
| nop(); // Pad the empty space.
|
| } else {
|
|
|