diff options
Diffstat (limited to 'vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S')
-rw-r--r-- | vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S b/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S new file mode 100644 index 0000000..8e7f728 --- /dev/null +++ b/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER.S @@ -0,0 +1,25 @@ + /* + * Call out to the runtime to lock an object. Because this thread + * may have been suspended in THREAD_MONITOR state and the Jit's + * translation cache subsequently cleared, we cannot return directly. + * Instead, unconditionally transition to the interpreter to resume. + * + * On entry: + * r0 - self pointer + * r1 - the object (which has already been null-checked by the caller + * r4 - the Dalvik PC of the following instruction. + */ + ldr r2, .LdvmLockObject + mov r3, #0 @ Record that we're not returning + str r3, [r0, #offThread_inJitCodeCache] + blx r2 @ dvmLockObject(self, obj) + @ refresh Jit's on/off status + ldr r0, [rGLUE, #offGlue_ppJitProfTable] + ldr r0, [r0] + ldr r2, .LdvmJitToInterpNoChain + str r0, [rGLUE, #offGlue_pJitProfTable] + @ Bail to interpreter - no chain [note - r4 still contains rPC] +#if defined(WITH_JIT_TUNING) + mov r0, #kHeavyweightMonitor +#endif + bx r2 |