DSP: regcache: Synch host regs back to previous state

only if we are told to not emit the fixup to get it to that state
This commit is contained in:
Pierre 2012-07-22 22:55:16 +02:00
parent a902c720e0
commit 5440ddde14
1 changed files with 12 additions and 0 deletions

View File

@ -251,6 +251,18 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit)
regs[i].last_use_ctr = cache.regs[i].last_use_ctr;
}
//sync the freely used xregs
if (!emit) {
for(i = 0; i < NUMXREGS; i++) {
if (cache.xregs[i].guest_reg == DSP_REG_USED &&
xregs[i].guest_reg == DSP_REG_NONE)
xregs[i].guest_reg = DSP_REG_USED;
if (cache.xregs[i].guest_reg == DSP_REG_NONE &&
xregs[i].guest_reg == DSP_REG_USED)
xregs[i].guest_reg = DSP_REG_NONE;
}
}
//consistency checks
for(i = 0; i < NUMXREGS; i++) {
_assert_msg_(DSPLLE,