MIPS64: Properly preserve $gp in art_quick_test_suspend
$gp register was restored in RESTORE_SAVE_EVERYTHING_CALLEE_SAVE_FRAME
with value from $t8, but $t8 has been clobbered in the meantime.
Calculation of $gp is done as a part of the macro
SETUP_SAVE_EVERYTHING_CALLEE_SAVE_FRAME. This allows us to use version
of .cpsetup where $gp is preserved on the stack, instead in another
register.
This fixes over 60 ART tests.
Additionally this suppresses assembler warnings for MIPS32 and MIPS64:
Warning: used $at without ".set noat"
Test: mma test-art-target-run-test on QEMU
Change-Id: Ic92680c3cb2a4405353b3640c836e92c0231bd15
diff --git a/runtime/arch/mips/quick_entrypoints_mips.S b/runtime/arch/mips/quick_entrypoints_mips.S
index b926bdf..9b24128 100644
--- a/runtime/arch/mips/quick_entrypoints_mips.S
+++ b/runtime/arch/mips/quick_entrypoints_mips.S
@@ -352,8 +352,11 @@
// Set up $gp, clobbering $ra and using the branch delay slot for a useful instruction.
bal 1f
+ .set push
+ .set noat
sw $at, 144($sp)
.cfi_rel_offset 1, 144
+ .set pop
1:
.cpload $ra
@@ -460,8 +463,11 @@
.cfi_restore 3
lw $v0, 148($sp)
.cfi_restore 2
+ .set push
+ .set noat
lw $at, 144($sp)
.cfi_restore 1
+ .set pop
addiu $sp, $sp, 256 # pop frame
.cfi_adjust_cfa_offset -256