diff --git a/core/hw/sh4/dyna/regalloc.h b/core/hw/sh4/dyna/regalloc.h index 1affa2e1a..0e912849c 100644 --- a/core/hw/sh4/dyna/regalloc.h +++ b/core/hw/sh4/dyna/regalloc.h @@ -540,6 +540,15 @@ struct RegAlloc } else { + if (op->op == shop_ftrv) + { + for (int sid = 0; sid < 16; sid++) + { + flush_span(reg_fr_0 + sid); + flush_span(reg_xf_0 + sid); + } + } + set reg_wt; set reg_rd; @@ -1083,14 +1092,15 @@ struct RegAlloc if (spn->begining(current_opid) && spn->preload) { - //printf("Op %d: Preloading r%d to %d\n",current_opid,spn->regstart,spn->nreg); if (spn->fpr) { + //printf("Op %d: Preloading f%d to %d\n",current_opid,spn->regstart,spn->nregf); preload_fpu++; Preload_FPU(spn->regstart,spn->nregf); } else { + //printf("Op %d: Preloading r%d to %d\n",current_opid,spn->regstart,spn->nreg); preload_gpr++; Preload(spn->regstart,spn->nreg); } @@ -1106,14 +1116,15 @@ struct RegAlloc if (spn->ending(current_opid) && spn->writeback) { - //printf("Op %d: Writing back r%d to %d\n",current_opid,spn->regstart,spn->nreg); if (spn->fpr) { + //printf("Op %d: Writing back f%d from %d\n",current_opid,spn->regstart,spn->nregf); writeback_fpu++; Writeback_FPU(spn->regstart,spn->nregf); } else { + //printf("Op %d: Writing back r%d from %d\n",current_opid,spn->regstart,spn->nreg); writeback_gpr++; Writeback(spn->regstart,spn->nreg); } @@ -1145,4 +1156,4 @@ struct RegAlloc virtual void Preload_FPU(u32 reg,nregf_t nreg)=0; virtual void Writeback_FPU(u32 reg,nregf_t nreg)=0; -}; \ No newline at end of file +};