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    movslq  2(rPC), OUT_ARG0                # rcx <- BBBBbbbb
13    leaq    (rPC,OUT_ARG0,2), OUT_ARG0      # rcx <- PC + BBBBbbbb*2
14    GET_VREG OUT_32_ARG1, rINSTq            # eax <- vAA
15    call    SYMBOL($func)
16    testl   %eax, %eax
17    movslq  %eax, rINSTq
18    jmp     MterpCommonTakenBranch
19