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   w0, 1                       // x0<- 000000000000bbbb (lo)
13    FETCH_S x1, 2                       // x1<- ssssssssssssBBBB (hi)
14    lsr     w3, wINST, #8               // w3<- AA
15    orr     x0, x0, x1, lsl #16         // x0<- ssssssssBBBBbbbb
16    GET_VREG w1, w3                     // w1<- vAA
17    add     x0, xPC, x0, lsl #1         // x0<- PC + ssssssssBBBBbbbb*2
18    bl      $func                       // w0<- code-unit branch offset
19    sxtw    xINST, w0
20    b       MterpCommonTakenBranchNoFlags
21