X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;fp=libpcsxcore%2Fnew_dynarec%2Fnew_dynarec.c;h=090165e664394696363a841f7c41a186f671d389;hp=07cd6191358db45912e8068655ada193be66703c;hb=de74f59932e94887debf30e5ec437d7f63591f74;hpb=25427adfbaed8ac93f01b56c4fac9811dd029b51 diff --git a/libpcsxcore/new_dynarec/new_dynarec.c b/libpcsxcore/new_dynarec/new_dynarec.c index 07cd6191..090165e6 100644 --- a/libpcsxcore/new_dynarec/new_dynarec.c +++ b/libpcsxcore/new_dynarec/new_dynarec.c @@ -37,6 +37,7 @@ static Jit g_jit; #include "new_dynarec_config.h" #include "../psxhle.h" #include "../psxinterpreter.h" +#include "../psxcounters.h" #include "../gte.h" #include "emu_if.h" // emulator interface #include "linkage_offsets.h" @@ -6500,6 +6501,15 @@ void new_dynarec_print_stats(void) #endif } +static void force_intcall(int i) +{ + memset(&dops[i], 0, sizeof(dops[i])); + dops[i].itype = INTCALL; + dops[i].rs1 = CCREG; + dops[i].is_exception = 1; + cinfo[i].ba = -1; +} + static int apply_hacks(void) { int i; @@ -6534,6 +6544,18 @@ static int apply_hacks(void) return 1; } } + if (Config.HLE) + { + if (start <= psxRegs.biosBranchCheck && psxRegs.biosBranchCheck < start + i*4) + { + i = (psxRegs.biosBranchCheck - start) / 4u + 23; + if (dops[i].is_jump && !dops[i+1].bt) + { + force_intcall(i); + dops[i+1].is_ds = 0; + } + } + } return 0; } @@ -6547,15 +6569,6 @@ static int is_ld_use_hazard(const struct decoded_insn *op_ld, return op->itype != CJUMP && op->itype != SJUMP; } -static void force_intcall(int i) -{ - memset(&dops[i], 0, sizeof(dops[i])); - dops[i].itype = INTCALL; - dops[i].rs1 = CCREG; - dops[i].is_exception = 1; - cinfo[i].ba = -1; -} - static void disassemble_one(int i, u_int src) { unsigned int type, op, op2, op3;