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) {
}
void SetPC(uintptr_t new_pc) OVERRIDE {
- SetGPR(RA, new_pc);
+ SetGPR(T9, new_pc);
}
bool IsAccessibleGPR(uint32_t reg) OVERRIDE {
// 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
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