Lines Matching refs:i
155 int i; in next_varybits() local
157 for (i = 0; i < 8; i++) in next_varybits()
158 if (!(mask & (1 << i))) in next_varybits()
160 if (bits & (1 << i)) in next_varybits()
162 bits &= ~(1 << i); in next_varybits()
166 bits |= (1 << i); in next_varybits()
184 int i; in valid_varybits() local
193 for (i = 0; i < v->n_patterns; i++) in valid_varybits()
194 if (ob == v->patterns[i]) in valid_varybits()
196 lprintf (sim_log, " found at %d\n", i); in valid_varybits()
216 int i; in prmb() local
217 for (i = 0; i < 8; i++) in prmb()
219 int bit = 0x80 >> i; in prmb()
227 if (i % 4 == 3) in prmb()
250 int i, vn = 0; in dump_lines() local
273 for (i = 0; i < op->nbytes * 8;) in dump_lines()
275 if (isalpha (op->id[i])) in dump_lines()
277 int byte = i >> 3; in dump_lines()
283 while (op->id[i] && isalpha (op->id[i])) in dump_lines()
286 shift = 7 - (i & 7); in dump_lines()
287 *np++ = op->id[i++]; in dump_lines()
288 if (op->var_start[i]) in dump_lines()
310 i++; in dump_lines()
318 for (i = 0; i < op->nbytes; i++) in dump_lines()
322 for (i = 0; i < op->nbytes; i++) in dump_lines()
324 if (i == 0) in dump_lines()
325 printf (",\n%*s op[%d]", level, "", i); in dump_lines()
327 printf (", op[%d]", i); in dump_lines()
330 for (i = 0; i < vn; i++) in dump_lines()
332 varnames[i], (i < vn - 1) ? "," : "\\n", varnames[i]); in dump_lines()
341 for (i = 0; i < op->nlines; i++) in dump_lines()
342 printf ("%*s%s", level, "", op->lines[i]); in dump_lines()
534 int i, j; in log_indirect() local
537 for (i = 0; i < 256; i++) in log_indirect()
542 fprintf (sim_log, "%s ", prmb (255, i)); in log_indirect()
544 switch (ind[i].type) in log_indirect()
548 if (last_c && (ind[i].u.op->comment == last_c)) in log_indirect()
551 fprintf (sim_log, "%s\n", ind[i].u.op->comment); in log_indirect()
552 last_c = ind[i].u.op->comment; in log_indirect()
559 cur_bits[byte] = i; in log_indirect()
560 log_indirect (ind[i].u.ind, byte + 1); in log_indirect()
573 int i; in main() local
628 int i, bit, byte; in main() local
640 for (i = 0; i < MAX_BYTES; i++) in main()
642 op->b[i].decodable_mask = 0; in main()
643 op->b[i].decodable_bits = 0; in main()
657 i = 0; in main()
660 bit = 7 - (i & 7); in main()
661 byte = i >> 3; in main()
693 op->var_start[i] = 1; in main()
702 op->id[i++] = *lp; in main()
720 int i, j; in main() local
721 for (i = 0; i < n_varies; i++) in main()
723 Vary *v = vary[i]; in main()
730 for (i = n_opcodes - 2; i >= 0; i--) in main()
732 if (opcodes[i]->nlines == 0) in main()
734 opcodes[i]->nlines = opcodes[i + 1]->nlines; in main()
735 opcodes[i]->lines = opcodes[i + 1]->lines; in main()
739 for (i = 0; i < 256; i++) in main()
740 indirect[i].type = T_unused; in main()
746 for (i = 0; i < n_opcodes; i++) in main()
750 for (j = 0; j < opcodes[i]->nbytes; j++) in main()
752 prmb (opcodes[i]->b[j].decodable_mask, in main()
753 opcodes[i]->b[j].decodable_bits)); in main()
754 lprintf (sim_log, " %s\n", opcodes[i]->comment); in main()
756 for (j = 0; j < opcodes[i]->nbytes; j++) in main()
759 if (isalpha (opcodes[i]->id[j * 8 + b])) in main()
761 if (fieldcmp (opcodes[i], j * 8 + b, vary[v]->name)) in main()
763 int nv = opcodes[i]->nvaries++; in main()
765 opcodes[i]->vary = in main()
766 (VaryRef *) realloc (opcodes[i]->vary, in main()
769 opcodes[i]->vary = in main()
772 opcodes[i]->vary[nv].varyno = v; in main()
773 opcodes[i]->vary[nv].byte = j; in main()
774 opcodes[i]->vary[nv].shift = 8 - b - vary[v]->nlen; in main()
776 vary[v]->name, opcodes[i]->vary[nv].shift); in main()
782 for (i = 0; i < n_opcodes; i++) in main()
785 int bytes = opcodes[i]->dbytes; in main()
788 for (i2 = 0; i2 < opcodes[i]->nbytes; i2++) in main()
789 lprintf (sim_log, " %02x", opcodes[i]->b[i2].decodable_mask); in main()
790 lprintf (sim_log, "%*s%s\n", 13 - 3 * opcodes[i]->nbytes, "", in main()
791 opcodes[i]->comment); in main()
794 for (i2 = 0; i2 < opcodes[i]->nbytes; i2++) in main()
795 lprintf (sim_log, " %02x", opcodes[i]->b[i2].decodable_bits); in main()
796 lprintf (sim_log, "%*s(%s) %d byte%s\n", 13 - 3 * opcodes[i]->nbytes, in main()
797 "", opcodes[i]->id, bytes, bytes == 1 ? "" : "s"); in main()
799 store_opcode_bits (opcodes[i], 0, indirect); in main()