static const char *srcbrmw, *srcwrmw, *srclrmw;
static const char *dstbrmw, *dstwrmw, *dstlrmw;
static const char *prefetch_long, *prefetch_word;
+static const char *prefetch_long_buffer, *prefetch_word_buffer;
static const char *srcli, *srcwi, *srcbi, *nextl, *nextw;
static const char *srcld, *dstld;
static const char *srcwd, *dstwd;
printf ("\t%s %s;\n", type, name);
add_mmu040_movem (movem);
if (using_ce020) {
- printf ("\t%s = %s (%d);\n", name, prefetch_long, r);
+ if (flags & GF_NOREFILL)
+ printf("\t%s = %s (%d);\n", name, prefetch_long_buffer, r);
+ else
+ printf("\t%s = %s (%d);\n", name, prefetch_long, r);
count_read += 2;
} else if (using_ce) {
/* we must do this because execution order of (something | something2) is not defined */
m68k_pc_offset += 2;
if (using_ce020) {
- sprintf (buffer, "%s (%d)", prefetch_word, r);
+ if (flags & GF_NOREFILL)
+ sprintf(buffer, "%s (%d)", prefetch_word_buffer, r);
+ else
+ sprintf(buffer, "%s (%d)", prefetch_word, r);
count_read++;
} else if (using_ce) {
if (flags & GF_NOREFILL) {
m68k_pc_offset += 2;
if (using_ce020 || using_prefetch_020) {
- sprintf (buffer, "(uae_u8)%s (%d)", prefetch_word, r);
+ if (flags & GF_NOREFILL)
+ sprintf(buffer, "(uae_u8)%s (%d)", prefetch_word_buffer, r);
+ else
+ sprintf(buffer, "(uae_u8)%s (%d)", prefetch_word, r);
count_read++;
} else if (using_ce) {
if (flags & GF_NOREFILL) {
got_ea_ce020 = false;
prefetch_long = NULL;
+ prefetch_word_buffer = NULL;
+ prefetch_long_buffer = NULL;
srcli = NULL;
srcbi = NULL;
disp000 = "get_disp_ea_000";
disp020 = "x_get_disp_ea_ce020";
prefetch_word = "get_word_ce020_prefetch";
prefetch_long = "get_long_ce020_prefetch";
+ prefetch_word_buffer = "get_word_ce020_prefetch_buffer";
+ prefetch_long_buffer = "get_long_ce020_prefetch_buffer";
srcli = "x_get_ilong";
srcwi = "x_get_iword";
srcbi = "x_get_ibyte";
disp020 = "x_get_disp_ea_ce030";
prefetch_long = "get_long_ce030_prefetch";
prefetch_word = "get_word_ce030_prefetch";
+ prefetch_word_buffer = "get_word_ce030_prefetch_buffer";
+ prefetch_long_buffer = "get_long_ce030_prefetch_buffer";
srcli = "x_get_ilong";
srcwi = "x_get_iword";
srcbi = "x_get_ibyte";
disp020 = "x_get_disp_ea_020";
prefetch_word = "get_word_020_prefetch";
prefetch_long = "get_long_020_prefetch";
+ prefetch_word_buffer = "get_word_020_prefetch_buffer";
+ prefetch_long_buffer = "get_long_020_prefetch_buffer";
srcli = "x_get_ilong";
srcwi = "x_get_iword";
srcbi = "x_get_ibyte";
dstwlrmw = dstw;
dstllrmw = dstl;
}
+ if (!prefetch_word_buffer)
+ prefetch_word_buffer = prefetch_word;
+ if (!prefetch_long_buffer)
+ prefetch_long_buffer = prefetch_long;
}
next_cpu_level = 1;
}
}
- genamode (curi, curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA | GF_NOREFILL);
+ genamode (curi, curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA | (cpu_level < 2 ? GF_NOREFILL : 0));
addcycles000 (2);
printf ("\tif (!cctrue (%d)) goto didnt_jump;\n", curi->cc);
if (using_exception_3) {
// cc false, counter not expired: idle cycle, prefetch
tail_ce020_done = true;
genamodedual (curi,
- curi->smode, "srcreg", curi->size, "src", 1, GF_AA | GF_NOREFILL,
- curi->dmode, "dstreg", curi->size, "offs", 1, GF_AA | GF_NOREFILL);
+ curi->smode, "srcreg", curi->size, "src", 1, GF_AA | (cpu_level < 2 ? GF_NOREFILL : 0),
+ curi->dmode, "dstreg", curi->size, "offs", 1, GF_AA | (cpu_level < 2 ? GF_NOREFILL : 0));
//genamode (curi, curi->smode, "srcreg", curi->size, "src", 1, 0, GF_AA | GF_NOREFILL);
//genamode (curi, curi->dmode, "dstreg", curi->size, "offs", 1, 0, GF_AA | GF_NOREFILL);
printf ("\tuaecptr oldpc = %s;\n", getpc);
exit = true;
}
regs.ipl = regs.ipl_pin;
- if (!currprefs.cpu_compatible || (currprefs.cpu_cycle_exact && currprefs.cpu_model <= 68000))
+ if (!currprefs.cpu_compatible || (currprefs.cpu_cycle_exact && currprefs.cpu_model <= 68010))
exit = true;
}
} CATCH (prb) {
exit = true;
}
- if (!currprefs.cpu_cycle_exact || currprefs.cpu_model > 68000)
+ if (!currprefs.cpu_cycle_exact || currprefs.cpu_model > 68010)
exit = true;
}
} CATCH (prb) {
return v;
}
+uae_u32 get_word_ce020_prefetch_buffer(int o)
+{
+ uae_u32 pc = m68k_getpc() + o;
+ uae_u32 v;
+
+ if (pc & 2) {
+ v = regs.prefetch020[0] & 0xffff;
+ regs.prefetch020[0] = regs.prefetch020[1];
+ //fill_icache020(pc + 2 + 4, mem_access_delay_longi_read_ce020);
+ //regs.prefetch020[1] = regs.cacheholdingdata020;
+ regs.db = regs.prefetch020[0] >> 16;
+ } else {
+ v = regs.prefetch020[0] >> 16;
+ regs.db = regs.prefetch020[1] >> 16;
+ }
+ do_cycles_ce020_internal(2);
+ return v;
+}
+
uae_u32 get_word_020_prefetch (int o)
{
uae_u32 pc = m68k_getpc () + o;
return v;
}
+uae_u32 get_word_ce030_prefetch_buffer(int o)
+{
+ uae_u32 pc = m68k_getpc() + o;
+ uae_u32 v;
+
+ if (pc & 2) {
+ v = regs.prefetch020[0] & 0xffff;
+ regs.prefetch020[0] = regs.prefetch020[1];
+ //fill_icache030(pc + 2 + 4);
+ //regs.prefetch020[1] = regs.cacheholdingdata020;
+ } else {
+ v = regs.prefetch020[0] >> 16;
+ }
+ do_cycles_ce020_internal(2);
+ return v;
+}
+
uae_u32 get_word_icache030(uaecptr addr)
{
fill_icache030(addr);