diff options
author | Douglas Leung <douglas.leung@imgtec.com> | 2015-03-27 15:38:30 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-03-31 03:33:52 +0000 |
commit | f96e8bdf47cfcbecd8ad8ebceb765e5a257ca143 (patch) | |
tree | c9794e7f763b40d8d67d8a6e60b65002a2e8b8bd /runtime/arch/mips | |
parent | d68cef75a2b57b5c5ab33065d567446b4510b143 (diff) | |
download | art-f96e8bdf47cfcbecd8ad8ebceb765e5a257ca143.zip art-f96e8bdf47cfcbecd8ad8ebceb765e5a257ca143.tar.gz art-f96e8bdf47cfcbecd8ad8ebceb765e5a257ca143.tar.bz2 |
Fix 099-vmdebug and 802-deoptimization art tests for Mips.
There are 2 bugs that are causing these 2 tests to fail the same way.
The first one is we should be using $t9 for function calls so $gp can
be calculated correctly. The second bug is there can't be a gap between
the quick frame and the callee save frame, otherwise the WalkStack()
function will get confused and crash.
Bug: 19003184
Change-Id: I3c545ce18268deb73150fca2a7d7a798540f1cf2
Diffstat (limited to 'runtime/arch/mips')
-rw-r--r-- | runtime/arch/mips/quick_entrypoints_mips.S | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/runtime/arch/mips/quick_entrypoints_mips.S b/runtime/arch/mips/quick_entrypoints_mips.S index 16f0e70..0c2250e 100644 --- a/runtime/arch/mips/quick_entrypoints_mips.S +++ b/runtime/arch/mips/quick_entrypoints_mips.S @@ -1094,7 +1094,7 @@ ENTRY art_quick_resolution_trampoline lw $a0, ARG_SLOT_SIZE($sp) # load resolved method to $a0 RESTORE_REFS_AND_ARGS_CALLEE_SAVE_FRAME move $t9, $v0 # code pointer must be in $t9 to generate the global pointer - jalr $zero, $v0 # tail call to method + jalr $zero, $t9 # tail call to method nop 1: RESTORE_REFS_AND_ARGS_CALLEE_SAVE_FRAME @@ -1203,29 +1203,28 @@ art_quick_instrumentation_exit: .cpload $t9 move $ra, $zero # link register is to here, so clobber with 0 for later checks + SETUP_REFS_ONLY_CALLEE_SAVE_FRAME addiu $sp, $sp, -16 # allocate temp storage on the stack .cfi_adjust_cfa_offset 16 - sw $v0, 12($sp) - .cfi_rel_offset 2, 32 - sw $v1, 8($sp) - .cfi_rel_offset 3, 36 - s.d $f0, 0($sp) - SETUP_REFS_ONLY_CALLEE_SAVE_FRAME + sw $v0, ARG_SLOT_SIZE+12($sp) + .cfi_rel_offset 2, ARG_SLOT_SIZE+12 + sw $v1, ARG_SLOT_SIZE+8($sp) + .cfi_rel_offset 3, ARG_SLOT_SIZE+8 + s.d $f0, ARG_SLOT_SIZE($sp) s.d $f0, 16($sp) # pass fpr result move $a2, $v0 # pass gpr result move $a3, $v1 - addiu $a1, $sp, ARG_SLOT_SIZE # pass $sp (remove arg slots) + addiu $a1, $sp, ARG_SLOT_SIZE+16 # pass $sp (remove arg slots and temp storage) jal artInstrumentationMethodExitFromCode # (Thread*, SP, gpr_res, fpr_res) move $a0, rSELF # pass Thread::Current - move $t0, $v0 # set aside returned link register + move $t9, $v0 # set aside returned link register move $ra, $v1 # set link register for deoptimization - addiu $sp, $sp, ARG_SLOT_SIZE+FRAME_SIZE_REFS_ONLY_CALLEE_SAVE # args slot + refs_only callee save frame - lw $v0, 12($sp) # restore return values - lw $v1, 8($sp) - l.d $f0, 0($sp) - jalr $zero, $t0 # return - addiu $sp, $sp, 16 # remove temp storage from stack - .cfi_adjust_cfa_offset -16 + lw $v0, ARG_SLOT_SIZE+12($sp) # restore return values + lw $v1, ARG_SLOT_SIZE+8($sp) + l.d $f0, ARG_SLOT_SIZE($sp) + jalr $zero, $t9 # return + addiu $sp, $sp, ARG_SLOT_SIZE+FRAME_SIZE_REFS_ONLY_CALLEE_SAVE+16 # restore stack + .cfi_adjust_cfa_offset -(ARG_SLOT_SIZE+FRAME_SIZE_REFS_ONLY_CALLEE_SAVE+16) END art_quick_instrumentation_exit /* |