Merge pull request #1171 from lioncash/loop

DSPJitRegCache: Merge two loops in popRegs.
This commit is contained in:
Lioncash 2014-09-28 02:07:44 -04:00
commit ee076453ce

View File

@ -505,20 +505,15 @@ void DSPJitRegCache::pushRegs()
void DSPJitRegCache::popRegs()
{
emitter.MOV(64, M(&ebp_store), R(RBP));
int push_count = 0;
for (X64CachedReg& xreg : xregs)
{
if (xreg.pushed)
{
push_count++;
}
}
int push_count = 0;
for (int i = NUMXREGS - 1; i >= 0; i--)
{
if (xregs[i].pushed)
{
emitter.POP((X64Reg)i);
push_count++;
emitter.POP(static_cast<X64Reg>(i));
xregs[i].pushed = false;
xregs[i].guest_reg = DSP_REG_USED;
}