uae_s16 length;
uae_s8 disp020[2];
uae_s8 branch;
+ uae_s8 nf;
};
static struct cputbl_tmp cputbltmp[65536];
if (opcode_next_clev[rp] != cpu_level) {
char *name = ua (lookuptab[idx].name);
- if (generate_stbl)
- fprintf(stblfile, "{ %sop_%04x_%d%s_ff, %sop_%04x_%d%s_ff, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n",
+ if (generate_stbl) {
+#ifdef NOFLAGS_SUPPORT_GENCPU
+ fprintf(stblfile, "{ %sop_%04x_%d%s_ff, %sop_%04x_%d%s_%s, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n",
(using_ce || using_ce020) ? "(cpuop_func*)" : "", opcode, opcode_last_postfix[rp], extra,
+ (using_ce || using_ce020) ? "(cpuop_func*)" : "", opcode, opcode_last_postfix[rp], extra, cputbltmp[opcode].nf ? "nf" : "ff",
+ opcode,
+ cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name);
+#else
+ fprintf(stblfile, "{ %sop_%04x_%d%s_ff, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n",
(using_ce || using_ce020) ? "(cpuop_func*)" : "", opcode, opcode_last_postfix[rp], extra,
opcode,
cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name);
+#endif
+ }
xfree (name);
return;
}
if (genamode8r_offset[1] > 0)
cputbltmp[opcode].disp020[1] = m68k_pc_total - genamode8r_offset[1] + 2;
cputbltmp[opcode].branch = branch_inst / 2;
+ cputbltmp[opcode].nf = 0;
if (m68k_pc_total > 0)
out("/* %d %d,%d %c */\n",
printf("%s", outbuffer);
- int nfgenerated = 0;
// generate noflags variant if needed
+ int nfgenerated = 0;
if (using_noflags && table68k[opcode].flagdead != 0 && !disable_noflags) {
convert_to_noflags(outbuffer);
printf("%s", outbuffer);
nfgenerated = 1;
+ cputbltmp[opcode].nf = 1;
}
if (generate_stbl) {
char *name = ua (lookuptab[idx].name);
if (i68000)
fprintf(stblfile, "#ifndef CPUEMU_68000_ONLY\n");
+#ifdef NOFLAGS_SUPPORT_GENCPU
fprintf(stblfile, "{ %sop_%04x_%d%s_ff, %sop_%04x_%d%s_%s, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n",
(using_ce || using_ce020) ? "(cpuop_func*)" : "", opcode, postfix, extra,
(using_ce || using_ce020) ? "(cpuop_func*)" : "", opcode, postfix, extra, nfgenerated ? "nf" : "ff",
opcode,
cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name);
+#else
+ fprintf(stblfile, "{ %sop_%04x_%d%s_ff, 0x%04x, %d, { %d, %d }, %d }, /* %s */\n",
+ (using_ce || using_ce020) ? "(cpuop_func*)" : "", opcode, postfix, extra,
+ opcode,
+ cputbltmp[opcode].length, cputbltmp[opcode].disp020[0], cputbltmp[opcode].disp020[1], cputbltmp[opcode].branch, name);
+#endif
if (i68000)
fprintf(stblfile, "#endif\n");
xfree (name);
opcode_next_clev[rp] = cpu_level;
}
using_indirect = -1;
- using_noflags = 1;
using_nocycles = 1;
+#ifdef NOFLAGS_SUPPORT_GENCPU
+ using_noflags = 1;
+#endif
#ifdef HAVE_GET_WORD_UNSWAPPED
using_get_word_unswapped = 1;
#endif
cpu_generic = true;
need_special_fixup = 1;
need_exception_oldpc = 1;
- using_noflags = 1;
using_nocycles = 1;
+#ifdef NOFLAGS_SUPPORT_GENCPU
+ using_noflags = 1;
+#endif
#ifdef HAVE_GET_WORD_UNSWAPPED
using_get_word_unswapped = 1;
#endif
static compop_func *compfunctbl[65536];
static compop_func *nfcompfunctbl[65536];
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
static cpuop_func *nfcpufunctbl[65536];
#endif
uae_u8* comp_pc_p;
static blockinfo* active;
static blockinfo* dormant;
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
/* 68040 */
extern const struct cputbl op_smalltbl_0[];
#endif
extern const struct comptbl op_smalltbl_0_comp_nf[];
extern const struct comptbl op_smalltbl_0_comp_ff[];
-#ifdef NOFLAGS_SUPPORT
-/* 68020 + 68881 */
-extern const struct cputbl op_smalltbl_1[];
-/* 68020 */
-extern const struct cputbl op_smalltbl_2[];
-/* 68010 */
-extern const struct cputbl op_smalltbl_3[];
-/* 68000 */
-extern const struct cputbl op_smalltbl_4[];
-/* 68000 slow but compatible. */
-extern const struct cputbl op_smalltbl_5[];
-#endif
-
static void flush_icache_hard(int);
static void flush_icache_lazy(int);
static void flush_icache_none(int);
unsigned int cpu_level = (currprefs.cpu_model - 68000) / 10;
if (cpu_level > 4)
cpu_level--;
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
extern const struct cputbl *uaegetjitcputbl(void);
const struct cputbl *nfctbl = uaegetjitcputbl();
#endif
for (opcode = 0; opcode < 65536; opcode++) {
reset_compop(opcode);
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
nfcpufunctbl[opcode] = op_illg;
#endif
prop[opcode].use_flags = FLAG_ALL;
nfcompfunctbl[cft_map(nftbl[i].opcode)] = NULL;
else
nfcompfunctbl[cft_map(nftbl[i].opcode)] = nftbl[i].handler;
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
+#ifdef NOFLAGS_SUPPORT_GENCPU
nfcpufunctbl[cft_map(nftbl[i].opcode)] = nfctbl[i].handler_nf;
+#else
+ nfcpufunctbl[cft_map(nftbl[i].opcode)] = nfctbl[i].handler_ff;
+#endif
#endif
}
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
+#ifdef NOFLAGS_SUPPORT_GENCPU
for (i = 0; nfctbl[i].handler_nf; i++) {
nfcpufunctbl[cft_map(nfctbl[i].opcode)] = nfctbl[i].handler_nf;
}
+#else
+ for (i = 0; nfctbl[i].handler_ff; i++) {
+ nfcpufunctbl[cft_map(nfctbl[i].opcode)] = nfctbl[i].handler_ff;
+ }
+#endif
#endif
for (opcode = 0; opcode < 65536; opcode++) {
compop_func *f;
compop_func *nff;
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
cpuop_func *nfcf;
#endif
int isaddx;
if (table68k[opcode].handler != -1) {
f = compfunctbl[cft_map(table68k[opcode].handler)];
nff = nfcompfunctbl[cft_map(table68k[opcode].handler)];
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
nfcf = nfcpufunctbl[cft_map(table68k[opcode].handler)];
#endif
isaddx = prop[cft_map(table68k[opcode].handler)].is_addx;
prop[cft_map(opcode)].cflow = cflow;
compfunctbl[cft_map(opcode)] = f;
nfcompfunctbl[cft_map(opcode)] = nff;
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
Dif (nfcf == op_illg)
abort();
nfcpufunctbl[cft_map(opcode)] = nfcf;
if (prop[cft_map(opcode)].cflow & fl_const_jump)
prop[cft_map(opcode)].use_flags = 0;
}
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
+#ifdef NOFLAGS_SUPPORT_GENCPU
for (i = 0; nfctbl[i].handler_nf != NULL; i++) {
if (nfctbl[i].specific)
nfcpufunctbl[cft_map(tbl[i].opcode)] = nfctbl[i].handler_nf;
}
+#else
+ for (i = 0; nfctbl[i].handler_ff != NULL; i++) {
+ if (nfctbl[i].specific)
+ nfcpufunctbl[cft_map(tbl[i].opcode)] = nfctbl[i].handler_ff;
+ }
+#endif
#endif
/* Merge in blacklist */
if (!needed_flags)
#endif
{
-#ifdef NOFLAGS_SUPPORT
+#ifdef NOFLAGS_SUPPORT_GENCOMP
cputbl=nfcpufunctbl;
#else
cputbl=cpufunctbl;