X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=deps%2Flightrec%2Foptimizer.c;h=cf431f2e264e14a28447facdd523b6c495f4c32c;hb=67b91c4b9c44f0d973d2d6a85481e3f437ccc583;hp=92b4daa5900b726a8673a71332cd8e27980023fc;hpb=d16005f843cd28ae90f091bd4e39a90b355e1d45;p=pcsx_rearmed.git diff --git a/deps/lightrec/optimizer.c b/deps/lightrec/optimizer.c index 92b4daa5..cf431f2e 100644 --- a/deps/lightrec/optimizer.c +++ b/deps/lightrec/optimizer.c @@ -675,7 +675,7 @@ static int lightrec_switch_delay_slots(struct block *block) list->c = next_op; list->next->c = op; list->next->flags = list->flags | LIGHTREC_NO_DS; - list->flags = flags; + list->flags = flags | LIGHTREC_NO_DS; list->offset++; list->next->offset--; } @@ -877,11 +877,12 @@ static int lightrec_flag_stores(struct block *block) case OP_SB: case OP_SH: case OP_SW: - /* Mark all store operations that target $sp, $gp, $k0 - * or $k1 as not requiring code invalidation. This is - * based on the heuristic that stores using one of these + /* Mark all store operations that target $sp or $gp + * as not requiring code invalidation. This is based + * on the heuristic that stores using one of these * registers as address will never hit a code page. */ - if (list->i.rs >= 26 && list->i.rs <= 29) { + if (list->i.rs >= 28 && list->i.rs <= 29 && + !block->state->maps[PSX_MAP_KERNEL_USER_RAM].ops) { pr_debug("Flaging opcode 0x%08x as not requiring invalidation\n", list->opcode); list->flags |= LIGHTREC_NO_INVALIDATE;