| Index: src/mips/assembler-mips-inl.h
|
| diff --git a/src/mips/assembler-mips-inl.h b/src/mips/assembler-mips-inl.h
|
| index b5ffe7391b462d0be199191cfdc93ee5a3e71269..c4c4fd25906fd2a6b6578ed19c60606ce3e60399 100644
|
| --- a/src/mips/assembler-mips-inl.h
|
| +++ b/src/mips/assembler-mips-inl.h
|
| @@ -83,6 +83,14 @@ bool Operand::is_reg() const {
|
| // RelocInfo.
|
|
|
| void RelocInfo::apply(intptr_t delta) {
|
| + if (IsCodeTarget(rmode_)) {
|
| + uint32_t scope1 = (uint32_t) target_address() & ~kImm28Mask;
|
| + uint32_t scope2 = reinterpret_cast<uint32_t>(pc_) & ~kImm28Mask;
|
| +
|
| + if (scope1 != scope2) {
|
| + Assembler::JumpLabelToJumpRegister(pc_);
|
| + }
|
| + }
|
| if (IsInternalReference(rmode_)) {
|
| // Absolute code pointer inside code object moves with the code object.
|
| byte* p = reinterpret_cast<byte*>(pc_);
|
| @@ -218,8 +226,9 @@ bool RelocInfo::IsPatchedReturnSequence() {
|
| Instr instr2 = Assembler::instr_at(pc_ + 2 * Assembler::kInstrSize);
|
| bool patched_return = ((instr0 & kOpcodeMask) == LUI &&
|
| (instr1 & kOpcodeMask) == ORI &&
|
| - (instr2 & kOpcodeMask) == SPECIAL &&
|
| - (instr2 & kFunctionFieldMask) == JALR);
|
| + ((instr2 & kOpcodeMask) == JAL ||
|
| + ((instr2 & kOpcodeMask) == SPECIAL &&
|
| + (instr2 & kFunctionFieldMask) == JALR)));
|
| return patched_return;
|
| }
|
|
|
|
|