mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
drc: reload cycles after memhandlers
This commit is contained in:
parent
bc3aea8e70
commit
97e95a29ac
1 changed files with 10 additions and 0 deletions
|
@ -983,6 +983,10 @@ static int emit_memhandler_read_(int size, int ram_check)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rcache_invalidate();
|
rcache_invalidate();
|
||||||
|
|
||||||
|
if (reg_map_g2h[SHR_SR] != -1)
|
||||||
|
emith_ctx_read(reg_map_g2h[SHR_SR], SHR_SR * 4);
|
||||||
|
|
||||||
// assuming arg0 and retval reg matches
|
// assuming arg0 and retval reg matches
|
||||||
return rcache_get_tmp_arg(0);
|
return rcache_get_tmp_arg(0);
|
||||||
}
|
}
|
||||||
|
@ -1040,6 +1044,9 @@ static void emit_memhandler_write(int size, u32 pc, int delay)
|
||||||
{
|
{
|
||||||
int ctxr;
|
int ctxr;
|
||||||
host_arg2reg(ctxr, 2);
|
host_arg2reg(ctxr, 2);
|
||||||
|
if (reg_map_g2h[SHR_SR] != -1)
|
||||||
|
emith_ctx_write(reg_map_g2h[SHR_SR], SHR_SR * 4);
|
||||||
|
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 0: // 8
|
case 0: // 8
|
||||||
// XXX: consider inlining sh2_drc_write8
|
// XXX: consider inlining sh2_drc_write8
|
||||||
|
@ -1065,6 +1072,9 @@ static void emit_memhandler_write(int size, u32 pc, int delay)
|
||||||
emith_call(sh2_drc_write32);
|
emith_call(sh2_drc_write32);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (reg_map_g2h[SHR_SR] != -1)
|
||||||
|
emith_ctx_read(reg_map_g2h[SHR_SR], SHR_SR * 4);
|
||||||
rcache_invalidate();
|
rcache_invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue