notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b6cd25e
)
drc: adjust ld_use_hazard
author
notaz
<notasas@gmail.com>
Sat, 23 Sep 2023 20:57:36 +0000
(23:57 +0300)
committer
notaz
<notasas@gmail.com>
Sat, 23 Sep 2023 21:25:27 +0000
(
00:25
+0300)
libpcsxcore/new_dynarec/new_dynarec.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/new_dynarec/new_dynarec.c
b/libpcsxcore/new_dynarec/new_dynarec.c
index
d37615e
..
07cd619
100644
(file)
--- a/
libpcsxcore/new_dynarec/new_dynarec.c
+++ b/
libpcsxcore/new_dynarec/new_dynarec.c
@@
-6537,10
+6537,14
@@
static int apply_hacks(void)
return 0;
}
return 0;
}
-static int is_ld_use_hazard(int ld_rt, const struct decoded_insn *op)
+static int is_ld_use_hazard(const struct decoded_insn *op_ld,
+ const struct decoded_insn *op)
{
{
- return ld_rt != 0 && (ld_rt == op->rs1 || ld_rt == op->rs2)
- && op->itype != LOADLR && op->itype != CJUMP && op->itype != SJUMP;
+ if (op_ld->rt1 == 0 || (op_ld->rt1 != op->rs1 && op_ld->rt1 != op->rs2))
+ return 0;
+ if (op_ld->itype == LOADLR && op->itype == LOADLR)
+ return op_ld->rt1 == op_ld->rs1;
+ return op->itype != CJUMP && op->itype != SJUMP;
}
static void force_intcall(int i)
}
static void force_intcall(int i)
@@
-6932,7
+6936,7
@@
static noinline void pass1_disassemble(u_int pagelimit)
else
dop = &dops[t];
}
else
dop = &dops[t];
}
- if ((dop && is_ld_use_hazard(
dops[i].rt1
, dop))
+ if ((dop && is_ld_use_hazard(
&dops[i]
, dop))
|| (!dop && Config.PreciseExceptions)) {
// jump target wants DS result - potential load delay effect
SysPrintf("load delay in DS @%08x (%08x)\n", start + i*4, start);
|| (!dop && Config.PreciseExceptions)) {
// jump target wants DS result - potential load delay effect
SysPrintf("load delay in DS @%08x (%08x)\n", start + i*4, start);
@@
-6949,7
+6953,7
@@
static noinline void pass1_disassemble(u_int pagelimit)
}
}
else if (i > 0 && dops[i-1].is_delay_load
}
}
else if (i > 0 && dops[i-1].is_delay_load
- && is_ld_use_hazard(
dops[i-1].rt1
, &dops[i])
+ && is_ld_use_hazard(
&dops[i-1]
, &dops[i])
&& (i < 2 || !dops[i-2].is_ujump)) {
SysPrintf("load delay @%08x (%08x)\n", start + i*4, start);
for (j = i - 1; j > 0 && dops[j-1].is_delay_load; j--)
&& (i < 2 || !dops[i-2].is_ujump)) {
SysPrintf("load delay @%08x (%08x)\n", start + i*4, start);
for (j = i - 1; j > 0 && dops[j-1].is_delay_load; j--)