1 %default { "func":"dvmInterpHandlePackedSwitch" } 2 %verify executed 3 /* 4 * Handle a packed-switch or sparse-switch instruction. In both cases 5 * we decode it and hand it off to a helper function. 6 * 7 * We don't really expect backward branches in a switch statement, but 8 * they're perfectly legal, so we check for them here. 9 * 10 * for: packed-switch, sparse-switch 11 */ 12 /* op vAA, +BBBB */ 13 movl 2(rPC),%ecx # ecx<- BBBBbbbb 14 GET_VREG_R %eax rINST # eax<- vAA 15 leal (rPC,%ecx,2),%ecx # ecx<- PC + BBBBbbbb*2 16 movl %eax,OUT_ARG1(%esp) # ARG1<- vAA 17 movl %ecx,OUT_ARG0(%esp) # ARG0<- switchData 18 call $func 19 movl rSELF,%ecx 20 ADVANCE_PC_INDEXED %eax 21 movl offThread_curHandlerTable(%ecx),rIBASE 22 FETCH_INST 23 #if defined(WITH_JIT) 24 GET_JIT_PROF_TABLE %ecx %eax 25 cmp $$0, %eax 26 jne common_updateProfile # set up %ebx & %edx & rPC 27 #endif 28 GOTO_NEXT 29