summaryrefslogtreecommitdiff
path: root/vm/compiler/template/armv5te/TEMPLATE_MEM_OP_DECODE.S
blob: ecd4eaabc8e86561d06e8b7f4634b98a3ee2a829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#if defined(WITH_SELF_VERIFICATION)
    /*
     * This handler encapsulates heap memory ops for selfVerification mode.
     *
     * The call to the handler is inserted prior to a heap memory operation.
     * This handler then calls a function to decode the memory op, and process
     * it accordingly. Afterwards, the handler changes the return address to
     * skip the memory op so it never gets executed.
     */
    push    {r0-r12,lr}                 @ save out all registers
    mov     r0, lr                      @ arg0 <- link register
    mov     r1, sp                      @ arg1 <- stack pointer
    ldr     r2, .LdvmSelfVerificationMemOpDecode @ defined in footer.S
    blx     r2                          @ decode and handle the mem op
    pop     {r0-r12,lr}                 @ restore all registers
    bx      lr                          @ return to compiled code
#endif