diff options
| -rw-r--r-- | runtime/arch/mips64/context_mips64.cc | 4 | ||||
| -rw-r--r-- | runtime/arch/mips64/context_mips64.h | 7 | ||||
| -rw-r--r-- | runtime/arch/mips64/quick_entrypoints_mips64.S | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/runtime/arch/mips64/context_mips64.cc b/runtime/arch/mips64/context_mips64.cc index 6637c371d2..cc6dc7e17c 100644 --- a/runtime/arch/mips64/context_mips64.cc +++ b/runtime/arch/mips64/context_mips64.cc @@ -29,10 +29,10 @@ void Mips64Context::Reset() { std::fill_n(gprs_, arraysize(gprs_), nullptr); std::fill_n(fprs_, arraysize(fprs_), nullptr); gprs_[SP] = &sp_; - gprs_[RA] = &ra_; + gprs_[T9] = &t9_; // Initialize registers with easy to spot debug values. sp_ = Mips64Context::kBadGprBase + SP; - ra_ = Mips64Context::kBadGprBase + RA; + t9_ = Mips64Context::kBadGprBase + T9; } void Mips64Context::FillCalleeSaves(const StackVisitor& fr) { diff --git a/runtime/arch/mips64/context_mips64.h b/runtime/arch/mips64/context_mips64.h index e4a144f420..26fbcfe9d4 100644 --- a/runtime/arch/mips64/context_mips64.h +++ b/runtime/arch/mips64/context_mips64.h @@ -41,7 +41,7 @@ class Mips64Context : public Context { } void SetPC(uintptr_t new_pc) OVERRIDE { - SetGPR(RA, new_pc); + SetGPR(T9, new_pc); } bool IsAccessibleGPR(uint32_t reg) OVERRIDE { @@ -82,8 +82,9 @@ class Mips64Context : public Context { // Pointers to registers in the stack, initialized to null except for the special cases below. uintptr_t* gprs_[kNumberOfGpuRegisters]; uint64_t* fprs_[kNumberOfFpuRegisters]; - // Hold values for sp and ra (return address) if they are not located within a stack frame. - uintptr_t sp_, ra_; + // Hold values for sp and t9 if they are not located within a stack frame. We use t9 for the + // PC (as ra is required to be valid for single-frame deopt and must not be clobbered). + uintptr_t sp_, t9_; }; } // namespace mips64 } // namespace art diff --git a/runtime/arch/mips64/quick_entrypoints_mips64.S b/runtime/arch/mips64/quick_entrypoints_mips64.S index 1b50b2e246..ce1b2f3d24 100644 --- a/runtime/arch/mips64/quick_entrypoints_mips64.S +++ b/runtime/arch/mips64/quick_entrypoints_mips64.S @@ -431,7 +431,7 @@ ENTRY_NO_GP art_quick_do_long_jump ld $ra, 248($a0) ld $a0, 32($a0) move $v0, $zero # clear result registers v0 and v1 - jalr $zero, $ra # do long jump + jalr $zero, $t9 # do long jump (do not use ra, it must not be clobbered) move $v1, $zero END art_quick_do_long_jump |