[MIPS] Fix DDMS(profiling) bug.

Change-Id: I47e87d600dc6eb529bf1ae9c8cc2b81910b9513c
Signed-off-by: Douglas Leung <douglas@mips.com>
diff --git a/vm/mterp/mips/OP_EXECUTE_INLINE.S b/vm/mterp/mips/OP_EXECUTE_INLINE.S
index cbc8917..34f23ea 100644
--- a/vm/mterp/mips/OP_EXECUTE_INLINE.S
+++ b/vm/mterp/mips/OP_EXECUTE_INLINE.S
@@ -91,14 +91,14 @@
     addu      a1, rSELF, offThread_retval  #  a1<- &self->retval
     GET_OPB(a0)                            #  a0 <- B
     # Stack should have 16/20 available
-    sw        a1, 16(sp)                   #  push &self->retval
+    sw        a1, STACK_OFFSET_ARG04(sp)   #  push &self->retval
     BAL(.L${opcode}_continue)              #  make call; will return after
     lw        gp, STACK_OFFSET_GP(sp)      #  restore gp
     move      rINST, v0                    #  save result of inline
     move      a0, rOBJ                     #  a0<- method
     move      a1, rSELF                    #  a1<- self
-    JAL(dvmFastMethodTraceExit)            #  (method, self)
-    beqz      v0, common_exceptionThrown   #  returned false, handle exception
+    JAL(dvmFastNativeMethodTraceExit)      #  (method, self)
+    beqz      rINST, common_exceptionThrown   #  returned false, handle exception
     FETCH_ADVANCE_INST(3)                  #  advance rPC, load rINST
     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     GOTO_OPCODE(t0)                        #  jump to next instruction
diff --git a/vm/mterp/mips/OP_EXECUTE_INLINE_RANGE.S b/vm/mterp/mips/OP_EXECUTE_INLINE_RANGE.S
index 3c95a8c..fd964f7 100644
--- a/vm/mterp/mips/OP_EXECUTE_INLINE_RANGE.S
+++ b/vm/mterp/mips/OP_EXECUTE_INLINE_RANGE.S
@@ -78,7 +78,7 @@
     addu      a1, rSELF, offThread_retval  #  a1<- &self->retval
     GET_OPA(a0)                            #  a0 <- A
     # Stack should have 16/20 available
-    sw        a1, 16(sp)                   #  push &self->retval
+    sw        a1, STACK_OFFSET_ARG04(sp)   #  push &self->retval
     move      rINST, rOBJ                  #  rINST<- method
     BAL(.L${opcode}_continue)              #  make call; will return after
     lw        gp, STACK_OFFSET_GP(sp)      #  restore gp
diff --git a/vm/mterp/out/InterpAsm-mips.S b/vm/mterp/out/InterpAsm-mips.S
index dd43f1f..48e6883 100644
--- a/vm/mterp/out/InterpAsm-mips.S
+++ b/vm/mterp/out/InterpAsm-mips.S
@@ -10850,14 +10850,14 @@
     addu      a1, rSELF, offThread_retval  #  a1<- &self->retval
     GET_OPB(a0)                            #  a0 <- B
     # Stack should have 16/20 available
-    sw        a1, 16(sp)                   #  push &self->retval
+    sw        a1, STACK_OFFSET_ARG04(sp)   #  push &self->retval
     BAL(.LOP_EXECUTE_INLINE_continue)              #  make call; will return after
     lw        gp, STACK_OFFSET_GP(sp)      #  restore gp
     move      rINST, v0                    #  save result of inline
     move      a0, rOBJ                     #  a0<- method
     move      a1, rSELF                    #  a1<- self
-    JAL(dvmFastMethodTraceExit)            #  (method, self)
-    beqz      v0, common_exceptionThrown   #  returned false, handle exception
+    JAL(dvmFastNativeMethodTraceExit)      #  (method, self)
+    beqz      rINST, common_exceptionThrown   #  returned false, handle exception
     FETCH_ADVANCE_INST(3)                  #  advance rPC, load rINST
     GET_INST_OPCODE(t0)                    #  extract opcode from rINST
     GOTO_OPCODE(t0)                        #  jump to next instruction
@@ -10912,7 +10912,7 @@
     addu      a1, rSELF, offThread_retval  #  a1<- &self->retval
     GET_OPA(a0)                            #  a0 <- A
     # Stack should have 16/20 available
-    sw        a1, 16(sp)                   #  push &self->retval
+    sw        a1, STACK_OFFSET_ARG04(sp)   #  push &self->retval
     move      rINST, rOBJ                  #  rINST<- method
     BAL(.LOP_EXECUTE_INLINE_RANGE_continue)              #  make call; will return after
     lw        gp, STACK_OFFSET_GP(sp)      #  restore gp