mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
sh2 drc, fix powerpc cache handling
This commit is contained in:
parent
448b634ccc
commit
f7615fc283
3 changed files with 5 additions and 4 deletions
|
@ -1559,10 +1559,11 @@ static int emith_cond_check(int cond)
|
|||
static NOINLINE void host_instructions_updated(void *base, void *end, int force)
|
||||
{
|
||||
int step = 32, lgstep = 5;
|
||||
char *_base = base, *_end = end;
|
||||
int count = (_end - _base + step-1) >> lgstep;
|
||||
char *_base = (char *)((uptr)base & ~(step-1));
|
||||
int count = (((char *)end - _base) >> lgstep) + 1;
|
||||
|
||||
if (count <= 0) count = 1; // make sure count is positive
|
||||
base = _base;
|
||||
|
||||
asm volatile(
|
||||
" mtctr %1;"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue