summaryrefslogtreecommitdiff
path: root/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER_DEBUG.S
blob: 5cf26e74d88791e7cbabbc5acc4cb4ba3397be6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    /*
     * To support deadlock prediction, this version of MONITOR_ENTER
     * will always call the heavyweight dvmLockObject, check for an
     * exception and then bail out to the interpreter.
     *
     * 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 & test for exception
    ldr     r0, [rGLUE, #offGlue_ppJitProfTable]
    ldr     r1, [rGLUE, #offGlue_self]
    ldr     r0, [r0]
    ldr     r1, [r1, #offThread_exception]
    str     r0, [rGLUE, #offGlue_pJitProfTable]
    cmp     r1, #0
    beq     1f
    ldr     r2, .LhandleException
    sub     r0, r4, #2     @ roll dPC back to this monitor instruction
    bx      r2
1:
    @ Bail to interpreter - no chain [note - r4 still contains rPC]
#if defined(WITH_JIT_TUNING)
    mov     r0, #kHeavyweightMonitor
#endif
    ldr     pc, .LdvmJitToInterpNoChain