Skip to content

Commit

Permalink
git subrepo pull --force deps/lightrec
Browse files Browse the repository at this point in the history
subrepo:
  subdir:   "deps/lightrec"
  merged:   "d4b70e0fce"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "d4b70e0fce"
git-subrepo:
  version:  "0.4.6"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "110b9eb"
  • Loading branch information
pcercuei committed Nov 24, 2023
1 parent 3059453 commit aeb3639
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deps/lightrec/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/pcercuei/lightrec.git
branch = master
commit = 109d0a6ba35d0279b9d0bf5bacafabc2d634af7b
parent = 99104c0456c7c923f40a474c1cbefb89a092b966
commit = d4b70e0fce940e988a402a163ac2ebbf88c00c26
parent = 305945333b4ec7d6910a077278c850b1cd887057
method = merge
cmdver = 0.4.6
11 changes: 6 additions & 5 deletions deps/lightrec/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ static u32 int_delay_slot(struct interpreter *inter, u32 pc, bool branch)
load_in_ds, branch_in_ds = false, branch_at_addr = false,
branch_taken;
u32 new_rt, old_rs = 0, new_rs = 0;
u32 next_pc, ds_next_pc;
u32 cause, epc;
u32 next_pc, ds_next_pc, epc;

if (op->i.op == OP_CP0 && op->r.rs == OP_CP0_RFE) {
/* When an IRQ happens, the PSX exception handlers (when done)
Expand All @@ -168,11 +167,13 @@ static u32 int_delay_slot(struct interpreter *inter, u32 pc, bool branch)
* but on branch boundaries, we need to adjust the return
* address so that the GTE opcode is effectively executed.
*/
cause = state->regs.cp0[13];
epc = state->regs.cp0[14];

if (!(cause & 0x7c) && epc == pc - 4)
pc -= 4;
if (epc == pc - 4) {
op_next = lightrec_read_opcode(state, epc);
if (op_next.i.op == OP_CP2)
pc -= 4;
}
}

if (inter->delay_slot) {
Expand Down

0 comments on commit aeb3639

Please sign in to comment.