git subrepo pull --force deps/lightrec
authorPaul Cercueil <paul@crapouillou.net>
Thu, 27 Jul 2023 10:11:31 +0000 (12:11 +0200)
committerPaul Cercueil <paul@crapouillou.net>
Thu, 27 Jul 2023 10:11:31 +0000 (12:11 +0200)
subrepo:
  subdir:   "deps/lightrec"
  merged:   "68a5d16b6b"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "68a5d16b6b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

deps/lightrec/.gitrepo
deps/lightrec/emitter.c
deps/lightrec/optimizer.c

index 8a344c4..b617407 100644 (file)
@@ -6,7 +6,7 @@
 [subrepo]
        remote = https://github.com/pcercuei/lightrec.git
        branch = master
-       commit = fcf239e7e9d42fedb7a8de64057d6895acf3ceee
-       parent = 03ec8a8c606eb87642be336632e1792ab89650d8
+       commit = 68a5d16b6b5ce155aebf7f4708483eaeb4992997
+       parent = bbda82f029ab0a9bbc91cb411d2cb56745d45510
        method = merge
        cmdver = 0.4.3
index a6d4355..1b4082b 100644 (file)
@@ -1178,7 +1178,7 @@ static u32 rec_io_mask(const struct lightrec_state *state)
 {
        u32 length = state->maps[PSX_MAP_HW_REGISTERS].length;
 
-       return GENMASK(31 - clz32(length - 1), 0);
+       return 0x1f800000 | GENMASK(31 - clz32(length - 1), 0);
 }
 
 static void rec_store_memory(struct lightrec_cstate *cstate,
index 5ce58ad..58d9d56 100644 (file)
@@ -1340,8 +1340,16 @@ static int lightrec_swap_load_delays(struct lightrec_state *state,
                } else if (!in_ds && opcode_is_load(c) && c.i.op != OP_LWC2) {
                        next = block->opcode_list[i + 1].c;
 
-                       if (c.i.op == OP_LWL && next.i.op == OP_LWR)
+                       switch (next.i.op) {
+                       case OP_LWL:
+                       case OP_LWR:
+                       case OP_REGIMM:
+                       case OP_BEQ:
+                       case OP_BNE:
+                       case OP_BLEZ:
+                       case OP_BGTZ:
                                continue;
+                       }
 
                        if (opcode_reads_register(next, c.i.rt)
                            && !opcode_writes_register(next, c.i.rs)) {