%default { "func":"MterpDoPackedSwitch" } /* * Handle a packed-switch or sparse-switch instruction. In both cases * we decode it and hand it off to a helper function. * * We don't really expect backward branches in a switch statement, but * they're perfectly legal, so we check for them here. * * for: packed-switch, sparse-switch */ /* op vAA, +BBBBBBBB */ .extern $func lh a0, 2(rPC) # a0 <- bbbb (lo) lh a1, 4(rPC) # a1 <- BBBB (hi) srl a3, rINST, 8 # a3 <- AA ins a0, a1, 16, 16 # a0 <- BBBBbbbb GET_VREG a1, a3 # a1 <- vAA dlsa a0, a0, rPC, 1 # a0 <- PC + BBBBbbbb*2 jal $func # v0 <- code-unit branch offset move rINST, v0 b MterpCommonTakenBranchNoFlags