aboutsummaryrefslogtreecommitdiff
path: root/deps/lightrec/optimizer.c
diff options
context:
space:
mode:
authornegativeExponent2020-05-21 00:16:51 +0800
committernegativeExponent2020-05-21 00:17:25 +0800
commita59e553648d65481f8a85822bdd4749fe70371ad (patch)
treee6ef9eb4c614871732bec1e9127395b973e73817 /deps/lightrec/optimizer.c
parent5c00ea32a0eab812299b08acd14c25bf6ba4ca7a (diff)
downloadpcsx_rearmed-a59e553648d65481f8a85822bdd4749fe70371ad.tar.gz
pcsx_rearmed-a59e553648d65481f8a85822bdd4749fe70371ad.tar.bz2
pcsx_rearmed-a59e553648d65481f8a85822bdd4749fe70371ad.zip
Update deps/lightrec
git subrepo clone --branch=master --force https://github.com/pcercuei/lightrec.git deps/lightrec subrepo: subdir: "deps/lightrec" merged: "2081869" upstream: origin: "https://github.com/pcercuei/lightrec.git" branch: "master" commit: "2081869" git-subrepo: version: "0.4.1" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "a04d8c2"
Diffstat (limited to 'deps/lightrec/optimizer.c')
-rw-r--r--deps/lightrec/optimizer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/deps/lightrec/optimizer.c b/deps/lightrec/optimizer.c
index 92b4daa..cf431f2 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;