Fix MIPS jni stub and save gp as part of ref only saves.
For the jni stub, the code pointer move can't be in the delay slot
because it jumps to the wrong place.
The gp register needs to be saved in the ref only frame in case an
exception needs to be delivered afterwards.
Change-Id: I71fb13e0e268aeaf50e8f1c093eb3262ea88cee8
diff --git a/src/oat/runtime/support_invoke.cc b/src/oat/runtime/support_invoke.cc
index 438ac8f..6cad527 100644
--- a/src/oat/runtime/support_invoke.cc
+++ b/src/oat/runtime/support_invoke.cc
@@ -95,9 +95,9 @@
// | A2 | arg2
// | A1 | arg1
// | A0/Method* | <- sp
- DCHECK_EQ(48U, Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs)->GetFrameSizeInBytes());
+ DCHECK_EQ(64U, Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs)->GetFrameSizeInBytes());
uintptr_t* regs = reinterpret_cast<uintptr_t*>(reinterpret_cast<byte*>(sp));
- uintptr_t caller_pc = regs[11];
+ uintptr_t caller_pc = regs[15];
#else
UNIMPLEMENTED(FATAL);
uintptr_t caller_pc = 0;