/* * dump switch table */ void dumpsw (INTPTR_T *ws) /*int ws[];*/ { INTPTR_T i,j; // gdata (); gnlabel (ws[WSTAB]); if (ws[WSCASEP] != swstp) { j = ws[WSCASEP]; while (j < swstp) { defword (); i = 4; while (i--) { outdec (swstcase[j]); outbyte (','); outlabel (swstlab[j++]); if ((i == 0) | (j >= swstp)) { newl (); break; } outbyte (','); } } } defword (); outlabel (ws[WSDEF]); outstr (",0"); newl(); // gtext (); }
/* * dump the literal pool */ void dumplits (void) { long j, k; if ((litptr == 0) && (const_nb == 0)) return; outstr("\t.data\n"); outstr("\t.bank CONST_BANK\n"); if (litptr) { outlabel(litlab); col(); k = 0; while (k < litptr) { defbyte(); j = 8; while (j--) { outdec(litq[k++] & 0xFF); if ((j == 0) | (k >= litptr)) { nl(); break; } outbyte(','); } } } if (const_nb) dump_const(); }
/* * gnlabel - generate numeric label */ void gnlabel (INTPTR_T nlab) /*int nlab; */ { flush_ins(); /* David - optimize.c related */ outlabel (nlab); col (); newl (); }
/* * dump the constant pool * */ void dump_const (void) { long i, j, k; long size; /* long c; */ if (const_nb) { const_ptr = const_var; for (i = 0; i < const_nb; i++) { size = const_ptr->size; cptr = const_ptr->sym; cptr->storage = EXTERN; prefix(); outstr(cptr->name); outstr(":"); nl(); j = const_ptr->data; while (size) { k = const_val[j++]; if ((cptr->type == CCHAR || cptr->type == CUCHAR) && cptr->ident != POINTER && !(cptr->ident == ARRAY && cptr->ptr_order > 0)) { defbyte(); const_size += 1; } else { defword(); const_size += 2; } if ((k == -1) || (k >= MAX_CONST_DATA)) outstr("0"); else if (k <= -1024) { k = (-k) - 1024; outlabel(litlab); outbyte('+'); outdec(k); } else outstr(&const_data[k]); nl(); size--; } const_ptr++; } } }