1a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham /* 2a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * Call out to the runtime to lock an object. Because this thread 3a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * may have been suspended in THREAD_MONITOR state and the Jit's 4a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * translation cache subsequently cleared, we cannot return directly. 5a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * Instead, unconditionally transition to the interpreter to resume. 6a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * 7a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * On entry: 8a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * a0 - self pointer 9a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * a1 - the object (which has already been null-checked by the caller 10a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham * rPC - the Dalvik PC of the following instruction. 11a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham */ 12a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham la a2, .LdvmLockObject 13a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham lw t9, (a2) 14a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham sw zero, offThread_inJitCodeCache(a0) # record that we're not returning 15a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham JALR(t9) # dvmLockObject(self, obj) 16a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham lw gp, STACK_OFFSET_GP(sp) 17a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham 18a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham la a2, .LdvmJitToInterpNoChain 19a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham lw a2, (a2) 20a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham 21a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham # Bail to interpreter - no chain [note - rPC still contains dPC] 22a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham#if defined(WITH_JIT_TUNING) 23a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham li a0, kHeavyweightMonitor 24a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham#endif 25a8b91c52fd8a90b784835dfe1f8898035266c4ddRaghu Gandham jr a2 26