* src/vm/jit/show.c (new_show_icmd): Show TABLESWITCH targets.
authoredwin <none@none>
Tue, 5 Sep 2006 21:50:36 +0000 (21:50 +0000)
committeredwin <none@none>
Tue, 5 Sep 2006 21:50:36 +0000 (21:50 +0000)
--HG--
branch : new_instruction_format

src/vm/jit/show.c

index 0dab461f9103ca078773794c0cd837abd7823b01..5d319f80042ac9e9e47106005f7e505cd1af0659 100644 (file)
@@ -1178,6 +1178,23 @@ void new_show_icmd(jitdata *jd, instruction *iptr, bool deadcode, int stage)
 
        case ICMD_TABLESWITCH:
                SHOW_S1(iptr);
+               table = iptr->dst.table;
+
+               i = iptr->sx.s23.s3.tablehigh
+                       - iptr->sx.s23.s2.tablelow + 1;
+
+               printf("high=%d low=%d count=%d\n", iptr->sx.s23.s3.tablehigh, iptr->sx.s23.s2.tablelow, i);
+               while (--i >= 0) {
+                       printf("\t\t%d --> ", table - iptr->dst.table);
+                       if (stage >= SHOW_STACK) {
+                               printf("L%03d\n", table->block->nr);
+                       }
+                       else {
+                               printf("insindex %d\n", table->insindex);
+                       }
+                       table++;
+               }
+
                break;
 
        case ICMD_LOOKUPSWITCH: