MIPS64: Fix art_quick_instrumentation_entry
Load address of art_quick_instrumentation_exit before $gp register
is restored in RESTORE_SAVE_REFS_AND_ARGS_FRAME.
This fixes a lot of tests like:
* 099-vmdebug
* 304-method-tracing
* 545-tracing-and-jit
* 802-deoptimization
* 988-method-trace
and many others as well as tests with --trace option.
Test: ./testrunner --optimizing --target in QEMU
Test: ./testrunner --optimizing --target --trace in QEMU
Change-Id: I1c45c4a04a45ebe00cb63fbde547367be6de62cf
diff --git a/runtime/arch/mips64/quick_entrypoints_mips64.S b/runtime/arch/mips64/quick_entrypoints_mips64.S
index 63f4f6c..58e0e44 100644
--- a/runtime/arch/mips64/quick_entrypoints_mips64.S
+++ b/runtime/arch/mips64/quick_entrypoints_mips64.S
@@ -2207,8 +2207,9 @@
# Deliver exception if we got nullptr as function.
move $t9, $v0 # $t9 holds reference to code
ld $a0, 8($sp) # Restore arg0.
+ dla $v0, art_quick_instrumentation_exit
RESTORE_SAVE_REFS_AND_ARGS_FRAME
- dla $ra, art_quick_instrumentation_exit
+ move $ra, $v0
jic $t9, 0 # call method, returning to art_quick_instrumentation_exit
.Ldeliver_instrumentation_entry_exception:
RESTORE_SAVE_REFS_AND_ARGS_FRAME