diff options
author | Ben Cheng <bccheng@android.com> | 2009-06-01 13:00:29 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@android.com> | 2009-06-04 12:46:11 -0700 |
commit | ba4fc8bfc1bccae048403bd1cea3b869dca61dd7 (patch) | |
tree | 3c05c1988501fd8a22ae73e02742ab291b2ff333 /vm/compiler/template/armv5te/footer.S | |
parent | b38914129f30aa696726717db6484735ad7fe234 (diff) | |
download | android_dalvik-ba4fc8bfc1bccae048403bd1cea3b869dca61dd7.tar.gz android_dalvik-ba4fc8bfc1bccae048403bd1cea3b869dca61dd7.tar.bz2 android_dalvik-ba4fc8bfc1bccae048403bd1cea3b869dca61dd7.zip |
Initial port of the Dalvik JIT enging to the internal repository.
Fixed files with trailing spaces.
Addressed review comments from Dan.
Addressed review comments from fadden.
Addressed review comments from Dan x 2.
Addressed review comments from Dan x 3.
Diffstat (limited to 'vm/compiler/template/armv5te/footer.S')
-rw-r--r-- | vm/compiler/template/armv5te/footer.S | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/vm/compiler/template/armv5te/footer.S b/vm/compiler/template/armv5te/footer.S new file mode 100644 index 000000000..e961e298b --- /dev/null +++ b/vm/compiler/template/armv5te/footer.S @@ -0,0 +1,58 @@ +/* + * =========================================================================== + * Common subroutines and data + * =========================================================================== + */ + + .text + .align 2 +.LinvokeNative: + @ Prep for the native call + @ r1 = newFP, r0 = methodToCall + ldr r3, [rGLUE, #offGlue_self] @ r3<- glue->self + ldr r9, [r3, #offThread_jniLocal_nextEntry] @ r9<- thread->refNext + str r1, [r3, #offThread_curFrame] @ self->curFrame = newFp + str r9, [r1, #(offStackSaveArea_localRefTop - sizeofStackSaveArea)] + @ newFp->localRefTop=refNext + mov r9, r3 @ r9<- glue->self (preserve) + SAVEAREA_FROM_FP(r10, r1) @ r10<- new stack save area + + mov r2, r0 @ r2<- methodToCall + mov r0, r1 @ r0<- newFP + add r1, rGLUE, #offGlue_retval @ r1<- &retval + + LDR_PC_LR "[r2, #offMethod_nativeFunc]" + + @ native return; r9=self, r10=newSaveArea + @ equivalent to dvmPopJniLocals + ldr r2, [r10, #offStackSaveArea_returnAddr] @ r2 = chaining cell ret + ldr r0, [r10, #offStackSaveArea_localRefTop] @ r0<- newSave->localRefTop + ldr r1, [r9, #offThread_exception] @ check for exception + str rFP, [r9, #offThread_curFrame] @ self->curFrame = fp + cmp r1, #0 @ null? + str r0, [r9, #offThread_jniLocal_nextEntry] @ self->refNext<- r0 + bne .LhandleException @ no, handle exception + bx r2 + +/* FIXME - untested */ +.LhandleException: + ldr rIBASE, .LdvmAsmInstructionStart + ldr rPC, [r10, #offStackSaveArea_savedPc] @ reload rPC + b dvmMterpCommonExceptionThrown + + .align 2 +.LdvmAsmInstructionStart: + .word dvmAsmInstructionStart +.LdvmJitToInterpNoChain: + .word dvmJitToInterpNoChain +.LdvmMterpStdBail: + .word dvmMterpStdBail +.L__aeabi_cdcmple: + .word __aeabi_cdcmple +.L__aeabi_cfcmple: + .word __aeabi_cfcmple + + .global dmvCompilerTemplateEnd +dmvCompilerTemplateEnd: + +#endif /* WITH_JIT */ |