* src/vm/jit/show.c (new_show_icmd): Show LOOKUPSWITCH targets.
authoredwin <none@none>
Tue, 5 Sep 2006 22:42:08 +0000 (22:42 +0000)
committeredwin <none@none>
Tue, 5 Sep 2006 22:42:08 +0000 (22:42 +0000)
--HG--
branch : new_instruction_format

src/vm/jit/show.c

index a964518fba5e0027dcc15db661dd4f26c446c609..9db1bd7f5f7cf8fb91ab34782193d9b92defd20c 100644 (file)
@@ -1200,6 +1200,27 @@ void new_show_icmd(jitdata *jd, instruction *iptr, bool deadcode, int stage)
 
        case ICMD_LOOKUPSWITCH:
                SHOW_S1(iptr);
+
+               printf("count=%d, default=", iptr->sx.s23.s2.lookupcount);
+               if (stage >= SHOW_STACK) {
+                       printf("L%03d\n", iptr->sx.s23.s3.lookupdefault.block->nr);
+               }
+               else {
+                       printf("insindex %d (L%03d)\n", iptr->sx.s23.s3.lookupdefault.insindex, BLOCK_OF(iptr->sx.s23.s3.lookupdefault.insindex)->nr);
+               }
+
+               lookup = iptr->dst.lookup;
+               i = iptr->sx.s23.s2.lookupcount;
+               while (--i >= 0) {
+                       printf("\t\t%d --> ", lookup->value);
+                       if (stage >= SHOW_STACK) {
+                               printf("L%03d\n", lookup->target.block->nr);
+                       }
+                       else {
+                               printf("insindex %d (L%03d)\n", lookup->target.insindex, BLOCK_OF(lookup->target.insindex)->nr);
+                       }
+                       lookup++;
+               }
                break;
 
        case ICMD_ARETURN: