2768 |
|
static void |
2769 |
|
generate_one_opcode (int rp, int noflags) |
2770 |
|
{ |
2771 |
– |
int i; |
2771 |
|
uae_u16 smsk, dmsk; |
2772 |
< |
long int opcode = opcode_map[rp]; |
2772 |
> |
const long int opcode = opcode_map[rp]; |
2773 |
> |
const char *opcode_str; |
2774 |
|
int aborted=0; |
2775 |
|
int have_srcreg=0; |
2776 |
|
int have_dstreg=0; |
2779 |
|
|| table68k[opcode].clev > cpu_level) |
2780 |
|
return; |
2781 |
|
|
2782 |
– |
for (i = 0; lookuptab[i].name[0]; i++) |
2783 |
– |
{ |
2784 |
– |
if (table68k[opcode].mnemo == lookuptab[i].mnemo) |
2785 |
– |
break; |
2786 |
– |
} |
2787 |
– |
|
2782 |
|
if (table68k[opcode].handler != -1) |
2783 |
|
return; |
2784 |
|
|
2930 |
|
comprintf("\tuae_u32 m68k_pc_offset_thisinst=m68k_pc_offset;\n"); |
2931 |
|
comprintf("\tm68k_pc_offset+=2;\n"); |
2932 |
|
|
2933 |
+ |
opcode_str = get_instruction_string (opcode); |
2934 |
+ |
|
2935 |
|
aborted=gen_opcode (opcode); |
2936 |
|
{ |
2937 |
|
int flags=0; |
2945 |
|
comprintf ("}\n"); |
2946 |
|
|
2947 |
|
if (aborted) { |
2948 |
< |
fprintf (stblfile, "{ NULL, 0x%08x, %ld }, /* %s */\n", flags, opcode, lookuptab[i].name); |
2948 |
> |
fprintf (stblfile, "{ NULL, 0x%08x, %ld }, /* %s */\n", flags, opcode, opcode_str); |
2949 |
|
com_discard(); |
2950 |
|
} |
2951 |
|
else { |
2952 |
|
if (noflags) { |
2953 |
< |
fprintf (stblfile, "{ op_%lx_%d_comp_nf, 0x%08x, %ld }, /* %s */\n", opcode, postfix, flags, opcode, lookuptab[i].name); |
2953 |
> |
fprintf (stblfile, "{ op_%lx_%d_comp_nf, 0x%08x, %ld }, /* %s */\n", opcode, postfix, flags, opcode, opcode_str); |
2954 |
|
fprintf (headerfile, "extern compop_func op_%lx_%d_comp_nf;\n", opcode, postfix); |
2955 |
< |
printf ("void REGPARAM2 op_%lx_%d_comp_nf(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name); |
2955 |
> |
printf ("void REGPARAM2 op_%lx_%d_comp_nf(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, opcode_str); |
2956 |
|
} |
2957 |
|
else { |
2958 |
< |
fprintf (stblfile, "{ op_%lx_%d_comp_ff, 0x%08x, %ld }, /* %s */\n", opcode, postfix, flags, opcode, lookuptab[i].name); |
2958 |
> |
fprintf (stblfile, "{ op_%lx_%d_comp_ff, 0x%08x, %ld }, /* %s */\n", opcode, postfix, flags, opcode, opcode_str); |
2959 |
|
fprintf (headerfile, "extern compop_func op_%lx_%d_comp_ff;\n", opcode, postfix); |
2960 |
< |
printf ("void REGPARAM2 op_%lx_%d_comp_ff(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name); |
2960 |
> |
printf ("void REGPARAM2 op_%lx_%d_comp_ff(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, opcode_str); |
2961 |
|
} |
2962 |
|
com_flush(); |
2963 |
|
} |