1%default { "isrange":"0", "routine":"NoRange" }
2%verify "executed"
3%verify "null object"
4    /*
5     * Handle an optimized virtual method call.
6     *
7     * for: [opt] invoke-virtual-quick, invoke-virtual-quick/range
8     */
9    /* op vB, {vD, vE, vF, vG, vA}, class@CCCC */
10    /* op vAA, {vCCCC..v(CCCC+AA-1)}, meth@BBBB */
11    FETCH(r3, 2)                        @ r3<- FEDC or CCCC
12    FETCH(r1, 1)                        @ r1<- BBBB
13    .if     (!$isrange)
14    and     r3, r3, #15                 @ r3<- C (or stays CCCC)
15    .endif
16    GET_VREG(r2, r3)                    @ r2<- vC ("this" ptr)
17    cmp     r2, #0                      @ is "this" null?
18    beq     common_errNullObject        @ null "this", throw exception
19    ldr     r2, [r2, #offObject_clazz]  @ r2<- thisPtr->clazz
20    ldr     r2, [r2, #offClassObject_vtable]    @ r2<- thisPtr->clazz->vtable
21    EXPORT_PC()                         @ invoke must export
22    ldr     r0, [r2, r1, lsl #2]        @ r3<- vtable[BBBB]
23    bl      common_invokeMethod${routine} @ continue on
24