summaryrefslogtreecommitdiffstats
path: root/runtime/arch
diff options
context:
space:
mode:
authorLazar Trsic <Lazar.Trsic@imgtec.com>2015-06-10 16:05:46 +0200
committerAndreas Gampe <agampe@google.com>2015-06-10 17:21:17 -0700
commit618fdff93cec53c0ed234898f2d42f38a25e3b66 (patch)
treee8b1ae10da2785dea4646a153112fcd99e4d2f73 /runtime/arch
parent21cb657159b3e93cc888685ade83f8fc519290be (diff)
downloadart-618fdff93cec53c0ed234898f2d42f38a25e3b66.tar.gz
art-618fdff93cec53c0ed234898f2d42f38a25e3b66.tar.bz2
art-618fdff93cec53c0ed234898f2d42f38a25e3b66.zip
[MIPS] Fix method tracing for mips64
Reg $v0 is being clobbered on using SETUP_REFS_ONLY_CALLEE_SAVE_FRAME inside instrumentation_exit() trampoline, when falling through from instrumentation_entry(). To fix, use $t1 for ArtMethod* fetching inside SETUP_ macros. Also fix some unrelated comment errors. Bug: 21555893 (cherry picked from commit 84bc06e30ba12c3ff07e577c52b63b9df162af7e) Change-Id: I4ab169f75988c4f0d924416a30196f21c1a043a3
Diffstat (limited to 'runtime/arch')
-rw-r--r--runtime/arch/mips/quick_entrypoints_mips.S2
-rw-r--r--runtime/arch/mips64/quick_entrypoints_mips64.S26
2 files changed, 14 insertions, 14 deletions
diff --git a/runtime/arch/mips/quick_entrypoints_mips.S b/runtime/arch/mips/quick_entrypoints_mips.S
index f1e6edb0ff..d1487478b1 100644
--- a/runtime/arch/mips/quick_entrypoints_mips.S
+++ b/runtime/arch/mips/quick_entrypoints_mips.S
@@ -380,7 +380,7 @@ END art_quick_do_long_jump
/*
* Called by managed code, saves most registers (forms basis of long jump context) and passes
* the bottom of the stack. artDeliverExceptionFromCode will place the callee save Method* at
- * the bottom of the thread. On entry r0 holds Throwable*
+ * the bottom of the thread. On entry a0 holds Throwable*
*/
ENTRY art_quick_deliver_exception
SETUP_SAVE_ALL_CALLEE_SAVE_FRAME
diff --git a/runtime/arch/mips64/quick_entrypoints_mips64.S b/runtime/arch/mips64/quick_entrypoints_mips64.S
index 227fe7e7f2..bdd8a30fd4 100644
--- a/runtime/arch/mips64/quick_entrypoints_mips64.S
+++ b/runtime/arch/mips64/quick_entrypoints_mips64.S
@@ -87,11 +87,11 @@
s.d $f24, 8($sp)
# load appropriate callee-save-method
- ld $v0, %got(_ZN3art7Runtime9instance_E)($gp)
- ld $v0, 0($v0)
+ ld $t1, %got(_ZN3art7Runtime9instance_E)($gp)
+ ld $t1, 0($t1)
THIS_LOAD_REQUIRES_READ_BARRIER
- ld $v0, RUNTIME_SAVE_ALL_CALLEE_SAVE_FRAME_OFFSET($v0)
- sd $v0, 0($sp) # Place ArtMethod* at bottom of stack.
+ ld $t1, RUNTIME_SAVE_ALL_CALLEE_SAVE_FRAME_OFFSET($t1)
+ sd $t1, 0($sp) # Place ArtMethod* at bottom of stack.
sd $sp, THREAD_TOP_QUICK_FRAME_OFFSET(rSELF) # Place sp in Thread::Current()->top_quick_frame.
.endm
@@ -130,11 +130,11 @@
sd $s2, 8($sp)
.cfi_rel_offset 18, 8
# load appropriate callee-save-method
- ld $v0, %got(_ZN3art7Runtime9instance_E)($gp)
- ld $v0, 0($v0)
+ ld $t1, %got(_ZN3art7Runtime9instance_E)($gp)
+ ld $t1, 0($t1)
THIS_LOAD_REQUIRES_READ_BARRIER
- ld $v0, RUNTIME_REFS_ONLY_CALLEE_SAVE_FRAME_OFFSET($v0)
- sd $v0, 0($sp) # Place Method* at bottom of stack.
+ ld $t1, RUNTIME_REFS_ONLY_CALLEE_SAVE_FRAME_OFFSET($t1)
+ sd $t1, 0($sp) # Place Method* at bottom of stack.
sd $sp, THREAD_TOP_QUICK_FRAME_OFFSET(rSELF) # Place sp in Thread::Current()->top_quick_frame.
.endm
@@ -253,11 +253,11 @@
.macro SETUP_REFS_AND_ARGS_CALLEE_SAVE_FRAME
SETUP_REFS_AND_ARGS_CALLEE_SAVE_FRAME_INTERNAL
# load appropriate callee-save-method
- ld $v0, %got(_ZN3art7Runtime9instance_E)($gp)
- ld $v0, 0($v0)
+ ld $t1, %got(_ZN3art7Runtime9instance_E)($gp)
+ ld $t1, 0($t1)
THIS_LOAD_REQUIRES_READ_BARRIER
- ld $v0, RUNTIME_REFS_AND_ARGS_CALLEE_SAVE_FRAME_OFFSET($v0)
- sd $v0, 0($sp) # Place Method* at bottom of stack.
+ ld $t1, RUNTIME_REFS_AND_ARGS_CALLEE_SAVE_FRAME_OFFSET($t1)
+ sd $t1, 0($sp) # Place Method* at bottom of stack.
sd $sp, THREAD_TOP_QUICK_FRAME_OFFSET(rSELF) # Place sp in Thread::Current()->top_quick_frame.
.endm
@@ -442,7 +442,7 @@ END art_quick_do_long_jump
* Called by managed code, saves most registers (forms basis of long jump
* context) and passes the bottom of the stack.
* artDeliverExceptionFromCode will place the callee save Method* at
- * the bottom of the thread. On entry v0 holds Throwable*
+ * the bottom of the thread. On entry a0 holds Throwable*
*/
ENTRY art_quick_deliver_exception
SETUP_SAVE_ALL_CALLEE_SAVE_FRAME