| 9758 | } |
| 9759 | |
| 9760 | static void generate_one_opcode (int rp, const char *extra) |
| 9761 | { |
| 9762 | int idx; |
| 9763 | uae_u16 smsk, dmsk; |
| 9764 | unsigned int opcode = opcode_map[rp]; |
| 9765 | int i68000 = table68k[opcode].clev > 0; |
| 9766 | int have_realopcode = 0; |
| 9767 | |
| 9768 | brace_level = 0; |
| 9769 | disable_noflags = 0; |
| 9770 | |
| 9771 | if (table68k[opcode].mnemo == i_ILLG |
| 9772 | || table68k[opcode].clev > cpu_level) |
| 9773 | return; |
| 9774 | |
| 9775 | for (idx = 0; lookuptab[idx].name[0]; idx++) { |
| 9776 | if (table68k[opcode].mnemo == lookuptab[idx].mnemo) |
| 9777 | break; |
| 9778 | } |
| 9779 | |
| 9780 | if (table68k[opcode].handler != -1) |
| 9781 | return; |
| 9782 | |
| 9783 | outbuffer[0] = 0; |
| 9784 | |
| 9785 | if (opcode_next_clev[rp] != cpu_level) { |
| 9786 | char *name = ua (lookuptab[idx].name); |
| 9787 | if (generate_stbl) { |
| 9788 | #ifdef NOFLAGS_SUPPORT_GENCPU |
| 9789 | if (func_noret) { |
| 9790 | fprintf(stblfile, "{ NULL, NULL, op_%04x_%d%s_ff, op_%04x_%d%s_%s, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n", |
| 9791 | opcode, opcode_last_postfix[rp], extra, |
| 9792 | opcode, opcode_last_postfix[rp], extra, cputbltmp[opcode].nf ? "nf" : "ff", |
| 9793 | opcode, |
| 9794 | cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name); |
| 9795 | } else { |
| 9796 | fprintf(stblfile, "{ op_%04x_%d%s_ff, op_%04x_%d%s_%s, NULL, NULL, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n", |
| 9797 | opcode, opcode_last_postfix[rp], extra, |
| 9798 | opcode, opcode_last_postfix[rp], extra, cputbltmp[opcode].nf ? "nf" : "ff", |
| 9799 | opcode, |
| 9800 | cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name); |
| 9801 | } |
| 9802 | #else |
| 9803 | if (func_noret) { |
| 9804 | fprintf(stblfile, "{ NULL, op_%04x_%d%s_ff, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n", |
| 9805 | opcode, opcode_last_postfix[rp], extra, opcode, |
| 9806 | cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name); |
| 9807 | } else { |
| 9808 | fprintf(stblfile, "{ op_%04x_%d%s_ff, NULL, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n", |
| 9809 | opcode, opcode_last_postfix[rp], extra, opcode, |
| 9810 | cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name); |
| 9811 | } |
| 9812 | #endif |
| 9813 | } |
| 9814 | xfree (name); |
| 9815 | return; |
| 9816 | } |
| 9817 | fprintf(headerfile, "extern %s op_%04x_%d%s_nf;\n", |
no test coverage detected