t2-code case instruction

case src lo hi
<jmp table>
$end

The jump table is a table of displacement relative to the address of "case" instruction. Each entry is a 32-bit value. The size of the table will be padded at the end so that the address $end aligns at an even address.  Its organisation is as follows:

disp. to the end of table, the "else" case
disp. to case lo   (case_1)
disp. to case lo+1 (case_2)
....
disp. to case hi   (case_n)
<pad>
$end:  

jmp else_case
case_1:  ... , jmp exit
case_2:  ... , jmp exit
...
case_n:  ... , jmp exit
else_case: ...
$exit

The first entry in the table is the displacement to $end.  It is used to jump to else_case.  This arrangement makes it easy to locate the end of the table. The jump table is fully mapped to values in the range lo..hi.  It is a direct map.  Any missing label will be filled with a displacement to $end (so it goes to else_case). The size of table is even(hi-lo+2).

The code for body of each case is located after the end of table. The first instruction at the end of table is "jmp else_case". Each case is ended with "jmp exit".  

