1 /* src/vm/jit/show.c - showing the intermediate representation
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Contact: cacao@cacaojvm.org
27 Authors: Andreas Krall
29 Changes: Edwin Steiner
43 #include "mm/memory.h"
45 #if defined(ENABLE_THREADS)
46 # include "threads/native/lock.h"
48 # include "threads/none/lock.h"
51 #include "vm/global.h"
52 #include "vm/options.h"
53 #include "vm/builtin.h"
54 #include "vm/stringlocal.h"
55 #include "vm/jit/jit.h"
56 #include "vm/jit/show.h"
57 #include "vm/jit/disass.h"
58 #include "vm/jit/stack.h"
59 #include "vm/jit/parse.h"
62 /* global variables ***********************************************************/
64 #if defined(ENABLE_THREADS) && !defined(NDEBUG)
65 static java_objectheader *show_global_lock;
69 /* forward declarations *******************************************************/
72 static void show_allocation(s4 type, s4 flags, s4 regoff);
76 /* show_init *******************************************************************
78 Initialized the show subsystem (called by jit_init).
80 *******************************************************************************/
85 #if defined(ENABLE_THREADS)
86 /* initialize the show lock */
88 show_global_lock = NEW(java_objectheader);
90 lock_init_object_lock(show_global_lock);
101 char *show_jit_type_names[] = {
112 char show_jit_type_letters[] = {
126 /* show_method *****************************************************************
128 Print the intermediate representation of a method.
130 NOTE: Currently this function may only be called after register allocation!
132 *******************************************************************************/
135 void show_method(jitdata *jd, int stage)
142 basicblock *lastbptr;
146 #if defined(ENABLE_DISASSEMBLER)
150 /* get required compiler data */
157 /* We need to enter a lock here, since the binutils disassembler
158 is not reentrant-able and we could not read functions printed
161 LOCK_MONITOR_ENTER(show_global_lock);
163 #if defined(ENABLE_INTRP)
165 irstage = SHOW_PARSE;
170 /* get the last basic block */
172 for (lastbptr = jd->basicblocks; lastbptr->next != NULL; lastbptr = lastbptr->next);
178 if (jd->isleafmethod)
179 printf("LEAFMETHOD\n");
181 printf("\nBasic blocks: %d\n", jd->basicblockcount);
182 if (stage >= SHOW_CODE) {
183 printf("Code length: %d\n", (lastbptr->mpc - jd->basicblocks[0].mpc));
184 printf("Data length: %d\n", cd->dseglen);
185 printf("Stub length: %d\n", (s4) (code->mcodelength -
186 ((ptrint) cd->dseglen + lastbptr->mpc)));
188 printf("Variables: %d (%d used)\n", jd->varcount, jd->vartop);
189 if (stage >= SHOW_STACK)
190 printf("Max interfaces: %d\n", jd->maxinterfaces);
191 printf("Max locals: %d\n", m->maxlocals);
192 printf("Max stack: %d\n", m->maxstack);
193 printf("Linenumbers: %d\n", m->linenumbercount);
194 printf("Branch to entry: %s\n", (jd->branchtoentry) ? "yes" : "no");
195 printf("Branch to end: %s\n", (jd->branchtoend) ? "yes" : "no");
196 if (stage >= SHOW_STACK) {
197 printf("Number of RETURNs: %d", jd->returncount);
198 if (jd->returncount == 1)
199 printf(" (block L%03d)", jd->returnblock->nr);
203 if (stage >= SHOW_PARSE) {
204 printf("Exceptions (Number: %d):\n", jd->exceptiontablelength);
205 for (ex = jd->exceptiontable; ex != NULL; ex = ex->down) {
206 printf(" L%03d ... ", ex->start->nr );
207 printf("L%03d = ", ex->end->nr);
208 printf("L%03d", ex->handler->nr);
209 printf(" (catchtype: ");
210 if (ex->catchtype.any)
211 if (IS_CLASSREF(ex->catchtype))
212 class_classref_print(ex->catchtype.ref);
214 class_print(ex->catchtype.cls);
221 if (irstage >= SHOW_PARSE && rd && jd->localcount > 0) {
222 printf("Local Table:\n");
223 for (i = 0; i < jd->localcount; i++) {
226 #if defined(ENABLE_JIT) && defined(ENABLE_DISASSEMBLER)
227 # if defined(ENABLE_INTRP)
230 printf(" (%s) ", show_jit_type_names[VAR(i)->type]);
231 if (irstage >= SHOW_REGS)
232 show_allocation(VAR(i)->type, VAR(i)->flags, VAR(i)->vv.regoff);
234 # if defined(ENABLE_INTRP)
237 #endif /* defined(ENABLE_JIT) && defined(ENABLE_DISASSEMBLER) */
242 if (cd->maxlocals > 0 && jd->local_map != NULL) {
243 printf("Local Map:\n");
245 for (j = 0; j < cd->maxlocals; j++) {
249 for (i = 0; i < 5; i++) {
250 printf(" %5s ",show_jit_type_names[i]);
251 for (j = 0; j < cd->maxlocals; j++) {
252 if (jd->local_map[j*5+i] == UNUSED)
255 printf("%4i ",jd->local_map[j*5+i]);
262 if (jd->maxinterfaces > 0 && jd->interface_map && irstage >= SHOW_STACK) {
264 interface_info *mapptr = jd->interface_map;
266 /* look if there exist any INOUTS */
267 for (i = 0; (i < (5 * jd->maxinterfaces)) && !exist; i++, mapptr++)
268 exist = (mapptr->flags != UNUSED);
271 printf("Interface Table: (In/Outvars)\n");
273 for (j = 0; j < jd->maxinterfaces; j++) {
278 for (i = 0; i < 5; i++) {
279 printf(" %5s ",show_jit_type_names[i]);
280 for (j = 0; j < jd->maxinterfaces; j++) {
281 s4 flags = jd->interface_map[j*5+i].flags;
282 s4 regoff = jd->interface_map[j*5+i].regoff;
288 if (irstage >= SHOW_REGS) {
289 if (flags & SAVEDVAR) {
290 if (flags & INMEMORY)
296 if (flags & INMEMORY)
301 printf("%c%03d(", ch, regoff);
302 show_allocation(i, flags, regoff);
306 if (flags & SAVEDVAR)
319 if (rd->memuse && irstage >= SHOW_REGS) {
323 printf("Stack slots: (memuse=%d", rd->memuse);
324 if (irstage >= SHOW_CODE) {
325 printf(", stackframesize=%d", cd->stackframesize);
326 max = cd->stackframesize;
329 for (i = 0; i < max; ++i) {
330 #if defined(HAS_4BYTE_STACKSLOT)
331 printf(" M%02d = 0x%02x(sp): ", i, i * 4);
333 printf(" M%02d = 0x%02x(sp): ", i, i * 8);
335 for (j = 0; j < jd->varcount; ++j) {
337 if ((v->flags & INMEMORY) && (v->vv.regoff == i)) {
338 show_variable(jd, j, irstage);
349 if (code->rplpoints) {
350 printf("Replacement Points:\n");
351 replace_show_replacement_points(code);
355 #if defined(ENABLE_DISASSEMBLER)
356 /* show code before first basic block */
358 if ((stage >= SHOW_CODE) && JITDATA_HAS_FLAG_SHOWDISASSEMBLE(jd)) {
359 u1ptr = (u1 *) ((ptrint) code->mcode + cd->dseglen);
361 for (; u1ptr < (u1 *) ((ptrint) code->mcode + cd->dseglen + jd->basicblocks[0].mpc);)
368 /* show code of all basic blocks */
370 for (bptr = jd->basicblocks; bptr != NULL; bptr = bptr->next)
371 show_basicblock(jd, bptr, stage);
373 #if defined(ENABLE_DISASSEMBLER)
374 /* show stubs code */
376 if (stage >= SHOW_CODE && opt_showdisassemble && opt_showexceptionstubs) {
377 printf("\nStubs code:\n");
378 printf("Length: %d\n\n", (s4) (code->mcodelength -
379 ((ptrint) cd->dseglen + lastbptr->mpc)));
381 u1ptr = (u1 *) ((ptrint) code->mcode + cd->dseglen + lastbptr->mpc);
383 for (; (ptrint) u1ptr < ((ptrint) code->mcode + code->mcodelength);)
390 LOCK_MONITOR_EXIT(show_global_lock);
392 /* finally flush the output */
396 #endif /* !defined(NDEBUG) */
399 /* show_basicblock *************************************************************
401 Print the intermediate representation of a basic block.
403 NOTE: Currently this function may only be called after register allocation!
405 *******************************************************************************/
408 void show_basicblock(jitdata *jd, basicblock *bptr, int stage)
416 #if defined(ENABLE_DISASSEMBLER)
420 /* get required compiler data */
425 if (bptr->flags != BBDELETED) {
426 #if defined(ENABLE_INTRP)
429 irstage = SHOW_PARSE;
434 deadcode = (bptr->flags < BBREACHED);
438 printf("======== %sL%03d ======== %s(flags: %d, bitflags: %01x, next: %d, type: ",
439 (bptr->bitflags & BBFLAG_REPLACEMENT) ? "<REPLACE> " : "",
441 (deadcode && stage >= SHOW_STACK) ? "DEADCODE! " : "",
442 bptr->flags, bptr->bitflags,
443 (bptr->next) ? (bptr->next->nr) : -1);
445 switch (bptr->type) {
457 printf(", icount: %d", bptr->icount);
459 if (irstage >= SHOW_CFG) {
460 printf(", preds: %d [ ", bptr->predecessorcount);
462 for (i = 0; i < bptr->predecessorcount; i++)
463 printf("%d ", bptr->predecessors[i]->nr);
471 printf(" (clone of L%03d)", bptr->original->nr);
473 basicblock *b = bptr->copied_to;
475 printf(" (copied to ");
476 for (; b; b = b->copied_to)
477 printf("L%03d ", b->nr);
484 if (irstage >= SHOW_STACK) {
486 show_variable_array(jd, bptr->invars, bptr->indepth, irstage);
492 for (i = 0; i < bptr->icount; i++, iptr++) {
493 printf("%4d: ", iptr->line);
495 show_icmd(jd, iptr, deadcode, irstage);
499 if (irstage >= SHOW_STACK) {
501 show_variable_array(jd, bptr->outvars, bptr->outdepth, irstage);
505 #if defined(ENABLE_DISASSEMBLER)
506 if ((stage >= SHOW_CODE) && JITDATA_HAS_FLAG_SHOWDISASSEMBLE(jd) &&
510 u1ptr = (u1 *) (code->mcode + cd->dseglen + bptr->mpc);
512 if (bptr->next != NULL) {
513 for (; u1ptr < (u1 *) (code->mcode + cd->dseglen + bptr->next->mpc);)
518 for (; u1ptr < (u1 *) (code->mcode + code->mcodelength);)
526 #endif /* !defined(NDEBUG) */
529 /* show_icmd *******************************************************************
531 Print the intermediate representation of an instruction.
533 NOTE: Currently this function may only be called after register allocation!
535 *******************************************************************************/
539 #define SHOW_TARGET(target) \
540 if (stage >= SHOW_STACK) { \
541 printf("--> L%03d ", (target).block->nr); \
543 else if (stage >= SHOW_PARSE) { \
544 printf("--> insindex %d (L%03d) ", (target).insindex, \
545 jd->basicblocks[jd->basicblockindex[ \
546 (target).insindex]].nr); \
549 printf("--> insindex %d ", (target).insindex); \
552 #define SHOW_INT_CONST(val) \
553 if (stage >= SHOW_PARSE) { \
554 printf("%d (0x%08x) ", (val), (val)); \
560 #if SIZEOF_VOID_P == 4
561 #define SHOW_LNG_CONST(val) \
562 if (stage >= SHOW_PARSE) \
563 printf("%lld (0x%016llx) ", (val), (val)); \
567 #define SHOW_LNG_CONST(val) \
568 if (stage >= SHOW_PARSE) \
569 printf("%ld (0x%016lx) ", (val), (val)); \
574 #if SIZEOF_VOID_P == 4
575 #define SHOW_ADR_CONST(val) \
576 if (stage >= SHOW_PARSE) \
577 printf("0x%08x ", (ptrint) (val)); \
581 #define SHOW_ADR_CONST(val) \
582 if (stage >= SHOW_PARSE) \
583 printf("0x%016lx ", (ptrint) (val)); \
588 #define SHOW_FLT_CONST(val) \
589 if (stage >= SHOW_PARSE) { \
592 printf("%g (0x%08x) ", (val), v.i); \
598 #if SIZEOF_VOID_P == 4
599 #define SHOW_DBL_CONST(val) \
600 if (stage >= SHOW_PARSE) { \
603 printf("%g (0x%016llx) ", (val), v.l); \
608 #define SHOW_DBL_CONST(val) \
609 if (stage >= SHOW_PARSE) { \
612 printf("%g (0x%016lx) ", (val), v.l); \
618 #define SHOW_INDEX(index) \
619 if (stage >= SHOW_PARSE) { \
620 printf("%d ", index); \
626 #define SHOW_STRING(val) \
627 if (stage >= SHOW_PARSE) { \
629 utf_display_printable_ascii( \
630 javastring_toutf((java_lang_String *)(val), false)); \
637 #define SHOW_CLASSREF_OR_CLASSINFO(c) \
638 if (stage >= SHOW_PARSE) { \
639 if (IS_CLASSREF(c)) \
640 class_classref_print(c.ref); \
642 class_print(c.cls); \
649 #define SHOW_FIELD(fmiref) \
650 if (stage >= SHOW_PARSE) { \
651 field_fieldref_print(fmiref); \
658 #define SHOW_VARIABLE(v) \
659 show_variable(jd, (v), stage)
661 #define SHOW_S1(iptr) \
662 if (stage >= SHOW_STACK) { \
663 SHOW_VARIABLE(iptr->s1.varindex); \
666 #define SHOW_S2(iptr) \
667 if (stage >= SHOW_STACK) { \
668 SHOW_VARIABLE(iptr->sx.s23.s2.varindex); \
671 #define SHOW_S3(iptr) \
672 if (stage >= SHOW_STACK) { \
673 SHOW_VARIABLE(iptr->sx.s23.s3.varindex); \
676 #define SHOW_DST(iptr) \
677 if (stage >= SHOW_STACK) { \
679 SHOW_VARIABLE(iptr->dst.varindex); \
682 #define SHOW_S1_LOCAL(iptr) \
683 if (stage >= SHOW_STACK) { \
684 printf("L%d ", iptr->s1.varindex); \
687 printf("JavaL%d ", iptr->s1.varindex); \
690 #define SHOW_DST_LOCAL(iptr) \
691 if (stage >= SHOW_STACK) { \
692 printf("=> L%d ", iptr->dst.varindex); \
695 printf("=> JavaL%d ", iptr->dst.varindex); \
698 static void show_allocation(s4 type, s4 flags, s4 regoff)
700 if (flags & INMEMORY) {
701 printf("M%02d", regoff);
705 #ifdef HAS_ADDRESS_REGISTER_FILE
706 if (type == TYPE_ADR) {
707 printf("R%02d", regoff);
712 if (IS_FLT_DBL_TYPE(type)) {
713 printf("F%02d", regoff);
717 #if defined(SUPPORT_COMBINE_INTEGER_REGISTERS)
718 if (IS_2_WORD_TYPE(type)) {
719 # if defined(ENABLE_JIT) && defined(ENABLE_DISASSEMBLER)
720 # if defined(ENABLE_INTRP)
722 printf("%3d/%3d", GET_LOW_REG(regoff),
723 GET_HIGH_REG(regoff));
726 printf("%3s/%3s", regs[GET_LOW_REG(regoff)],
727 regs[GET_HIGH_REG(regoff)]);
729 printf("%3d/%3d", GET_LOW_REG(regoff),
730 GET_HIGH_REG(regoff));
734 #endif /* defined(SUPPORT_COMBINE_INTEGER_REGISTERS) */
736 #if defined(ENABLE_JIT) && defined(ENABLE_DISASSEMBLER)
737 # if defined(ENABLE_INTRP)
739 printf("%3d", regoff);
742 printf("%3s", regs[regoff]);
744 printf("%3d", regoff);
748 void show_variable(jitdata *jd, s4 index, int stage)
754 if (index < 0 || index >= jd->varcount) {
755 printf("<INVALID INDEX:%d>", index);
762 case TYPE_INT: type = 'i'; break;
763 case TYPE_LNG: type = 'l'; break;
764 case TYPE_FLT: type = 'f'; break;
765 case TYPE_DBL: type = 'd'; break;
766 case TYPE_ADR: type = 'a'; break;
767 case TYPE_RET: type = 'r'; break;
771 if (index < jd->localcount) {
773 if (v->flags & (PREALLOC | INOUT))
774 printf("<INVALID FLAGS!>");
777 if (v->flags & PREALLOC) {
779 if (v->flags & INOUT)
780 printf("<INVALID FLAGS!>");
782 else if (v->flags & INOUT)
788 printf("%c%c%d", kind, type, index);
790 if (v->flags & SAVEDVAR)
793 if (stage >= SHOW_REGS || (v->flags & PREALLOC)) {
795 show_allocation(v->type, v->flags, v->vv.regoff);
802 void show_variable_array(jitdata *jd, s4 *vars, int n, int stage)
807 for (i=0; i<n; ++i) {
810 show_variable(jd, vars[i], stage);
815 void show_icmd(jitdata *jd, instruction *iptr, bool deadcode, int stage)
818 branch_target_t *table;
819 lookup_target_t *lookup;
820 constant_FMIref *fmiref;
824 /* get the opcode and the condition */
828 printf("%s ", icmd_table[opcode].name);
830 if (stage < SHOW_PARSE)
836 /* Print the condition for conditional instructions. */
838 /* XXX print condition from flags */
840 if (iptr->flags.bits & INS_FLAG_UNRESOLVED)
841 printf("(UNRESOLVED) ");
847 case ICMD_CHECKNULL_POP:
852 case ICMD_ARRAYLENGTH:
919 /* binary/const INT */
931 case ICMD_IUSHRCONST:
934 case ICMD_LUSHRCONST:
936 SHOW_INT_CONST(iptr->sx.val.i);
940 /* ?ASTORECONST (trinary/const INT) */
941 case ICMD_IASTORECONST:
942 case ICMD_BASTORECONST:
943 case ICMD_CASTORECONST:
944 case ICMD_SASTORECONST:
947 SHOW_INT_CONST(iptr->sx.s23.s3.constval);
952 SHOW_INT_CONST(iptr->sx.val.i);
956 /* binary/const LNG */
967 SHOW_LNG_CONST(iptr->sx.val.l);
971 /* trinary/const LNG (<= pointer size) */
972 case ICMD_LASTORECONST:
975 SHOW_ADR_CONST(iptr->sx.s23.s3.constval);
980 SHOW_LNG_CONST(iptr->sx.val.l);
986 SHOW_FLT_CONST(iptr->sx.val.f);
992 SHOW_DBL_CONST(iptr->sx.val.d);
998 if (iptr->flags.bits & INS_FLAG_CLASS) {
999 SHOW_ADR_CONST(iptr->sx.val.anyptr);
1000 SHOW_CLASSREF_OR_CLASSINFO(iptr->sx.val.c);
1002 else if (iptr->sx.val.anyptr == NULL) {
1006 SHOW_ADR_CONST(iptr->sx.val.anyptr);
1007 SHOW_STRING(iptr->sx.val.stringconst);
1012 case ICMD_AASTORECONST:
1015 printf("%p ", (void*) iptr->sx.s23.s3.constval);
1018 case ICMD_GETFIELD: /* 1 -> 1 */
1019 case ICMD_PUTFIELD: /* 2 -> 0 */
1020 case ICMD_PUTSTATIC: /* 1 -> 0 */
1021 case ICMD_GETSTATIC: /* 0 -> 1 */
1022 case ICMD_PUTSTATICCONST: /* 0 -> 0 */
1023 case ICMD_PUTFIELDCONST: /* 1 -> 0 */
1024 if (opcode != ICMD_GETSTATIC && opcode != ICMD_PUTSTATICCONST) {
1026 if (opcode == ICMD_PUTFIELD) {
1030 INSTRUCTION_GET_FIELDREF(iptr, fmiref);
1033 if (opcode == ICMD_GETSTATIC || opcode == ICMD_GETFIELD) {
1039 SHOW_S1_LOCAL(iptr);
1040 SHOW_INT_CONST(iptr->sx.val.i);
1041 SHOW_DST_LOCAL(iptr);
1071 SHOW_S1_LOCAL(iptr);
1072 if (stage >= SHOW_STACK) {
1073 printf(" ---> L%03d", iptr->dst.block->nr);
1082 SHOW_S1_LOCAL(iptr);
1092 SHOW_DST_LOCAL(iptr);
1093 if (stage >= SHOW_STACK && iptr->sx.s23.s3.javaindex != UNUSED)
1094 printf(" (javaindex %d)", iptr->sx.s23.s3.javaindex);
1105 case ICMD_ANEWARRAY:
1109 case ICMD_MULTIANEWARRAY:
1110 if (stage >= SHOW_STACK) {
1111 argp = iptr->sx.s23.s2.args;
1112 i = iptr->s1.argcount;
1114 SHOW_VARIABLE(*(argp++));
1118 printf("argcount=%d ", iptr->s1.argcount);
1123 case ICMD_CHECKCAST:
1126 class_classref_or_classinfo_print(iptr->sx.s23.s3.c);
1130 case ICMD_INSTANCEOF:
1135 case ICMD_INLINE_START:
1136 case ICMD_INLINE_END:
1137 #if defined(ENABLE_INLINING)
1139 insinfo_inline *ii = iptr->sx.s23.s3.inlineinfo;
1141 method_print(ii->outer);
1143 method_print(ii->method);
1150 if (stage >= SHOW_STACK) {
1151 argp = iptr->sx.s23.s2.args;
1152 i = iptr->s1.argcount;
1154 if ((iptr->s1.argcount - 1 - i) == iptr->sx.s23.s3.bte->md->paramcount)
1155 printf(" pass-through: ");
1156 SHOW_VARIABLE(*(argp++));
1159 printf("%s ", iptr->sx.s23.s3.bte->cname);
1160 if (iptr->sx.s23.s3.bte->md->returntype.type != TYPE_VOID) {
1165 case ICMD_INVOKEVIRTUAL:
1166 case ICMD_INVOKESPECIAL:
1167 case ICMD_INVOKESTATIC:
1168 case ICMD_INVOKEINTERFACE:
1169 if (stage >= SHOW_STACK) {
1171 INSTRUCTION_GET_METHODDESC(iptr, md);
1172 argp = iptr->sx.s23.s2.args;
1173 i = iptr->s1.argcount;
1175 if ((iptr->s1.argcount - 1 - i) == md->paramcount)
1176 printf(" pass-through: ");
1177 SHOW_VARIABLE(*(argp++));
1180 INSTRUCTION_GET_METHODREF(iptr, fmiref);
1181 method_methodref_print(fmiref);
1182 if (fmiref->parseddesc.md->returntype.type != TYPE_VOID) {
1195 SHOW_INT_CONST(iptr->sx.val.i);
1196 SHOW_TARGET(iptr->dst);
1206 SHOW_LNG_CONST(iptr->sx.val.l);
1207 SHOW_TARGET(iptr->dst);
1211 case ICMD_INLINE_GOTO:
1212 SHOW_TARGET(iptr->dst);
1216 SHOW_TARGET(iptr->sx.s23.s3.jsrtarget);
1221 case ICMD_IFNONNULL:
1223 SHOW_TARGET(iptr->dst);
1226 case ICMD_IF_ICMPEQ:
1227 case ICMD_IF_ICMPNE:
1228 case ICMD_IF_ICMPLT:
1229 case ICMD_IF_ICMPGE:
1230 case ICMD_IF_ICMPGT:
1231 case ICMD_IF_ICMPLE:
1233 case ICMD_IF_LCMPEQ:
1234 case ICMD_IF_LCMPNE:
1235 case ICMD_IF_LCMPLT:
1236 case ICMD_IF_LCMPGE:
1237 case ICMD_IF_LCMPGT:
1238 case ICMD_IF_LCMPLE:
1240 case ICMD_IF_FCMPEQ:
1241 case ICMD_IF_FCMPNE:
1243 case ICMD_IF_FCMPL_LT:
1244 case ICMD_IF_FCMPL_GE:
1245 case ICMD_IF_FCMPL_GT:
1246 case ICMD_IF_FCMPL_LE:
1248 case ICMD_IF_FCMPG_LT:
1249 case ICMD_IF_FCMPG_GE:
1250 case ICMD_IF_FCMPG_GT:
1251 case ICMD_IF_FCMPG_LE:
1253 case ICMD_IF_DCMPEQ:
1254 case ICMD_IF_DCMPNE:
1256 case ICMD_IF_DCMPL_LT:
1257 case ICMD_IF_DCMPL_GE:
1258 case ICMD_IF_DCMPL_GT:
1259 case ICMD_IF_DCMPL_LE:
1261 case ICMD_IF_DCMPG_LT:
1262 case ICMD_IF_DCMPG_GE:
1263 case ICMD_IF_DCMPG_GT:
1264 case ICMD_IF_DCMPG_LE:
1266 case ICMD_IF_ACMPEQ:
1267 case ICMD_IF_ACMPNE:
1270 SHOW_TARGET(iptr->dst);
1273 case ICMD_TABLESWITCH:
1275 table = iptr->dst.table;
1277 i = iptr->sx.s23.s3.tablehigh - iptr->sx.s23.s2.tablelow + 1;
1279 printf("high=%d low=%d count=%d\n", iptr->sx.s23.s3.tablehigh, iptr->sx.s23.s2.tablelow, i);
1281 printf("\t\t%d --> ", (int) (table - iptr->dst.table));
1282 if (stage >= SHOW_STACK) {
1283 printf("L%03d\n", table->block->nr);
1286 printf("insindex %d (L%03d)\n", table->insindex, BLOCK_OF(table->insindex)->nr);
1293 case ICMD_LOOKUPSWITCH:
1296 printf("count=%d, default=", iptr->sx.s23.s2.lookupcount);
1297 if (stage >= SHOW_STACK) {
1298 printf("L%03d\n", iptr->sx.s23.s3.lookupdefault.block->nr);
1301 printf("insindex %d (L%03d)\n", iptr->sx.s23.s3.lookupdefault.insindex, BLOCK_OF(iptr->sx.s23.s3.lookupdefault.insindex)->nr);
1304 lookup = iptr->dst.lookup;
1305 i = iptr->sx.s23.s2.lookupcount;
1307 printf("\t\t%d --> ", lookup->value);
1308 if (stage >= SHOW_STACK) {
1309 printf("L%03d\n", lookup->target.block->nr);
1312 printf("insindex %d (L%03d)\n", lookup->target.insindex, BLOCK_OF(lookup->target.insindex)->nr);
1338 #endif /* !defined(NDEBUG) */
1342 * These are local overrides for various environment variables in Emacs.
1343 * Please do not remove this and leave it at the end of the file, where
1344 * Emacs will automagically detect them.
1345 * ---------------------------------------------------------------------
1348 * indent-tabs-mode: t
1352 * vim:noexpandtab:sw=4:ts=4: