1%default { "func":"MterpDoPackedSwitch" } 2 /* 3 * Handle a packed-switch or sparse-switch instruction. In both cases 4 * we decode it and hand it off to a helper function. 5 * 6 * We don't really expect backward branches in a switch statement, but 7 * they're perfectly legal, so we check for them here. 8 * 9 * for: packed-switch, sparse-switch 10 */ 11 /* op vAA, +BBBB */ 12 FETCH r0, 1 @ r0<- bbbb (lo) 13 FETCH r1, 2 @ r1<- BBBB (hi) 14 mov r3, rINST, lsr #8 @ r3<- AA 15 orr r0, r0, r1, lsl #16 @ r0<- BBBBbbbb 16 GET_VREG r1, r3 @ r1<- vAA 17 add r0, rPC, r0, lsl #1 @ r0<- PC + BBBBbbbb*2 18 bl $func @ r0<- code-unit branch offset 19 movs rINST, r0 20 b MterpCommonTakenBranch 21