[ARM] Make sure to flush a register location. IMM still doesn't work...

This commit is contained in:
Ryan Houdek 2013-08-05 07:15:15 +00:00
parent f2e43f47a4
commit 25fc0c27f3
1 changed files with 4 additions and 1 deletions

View File

@ -183,8 +183,12 @@ ARMReg ArmRegCache::BindToRegister(u32 preg)
{
emit->STR(ArmCRegs[lastRegIndex].Reg, R9, PPCSTATE_OFF(gpr) + ArmCRegs[lastRegIndex].PPCReg * 4);
emit->MOVI2R(ArmCRegs[lastRegIndex].Reg, regs[preg].GetImm());
regs[ArmCRegs[lastRegIndex].PPCReg].Flush();
ArmCRegs[lastRegIndex].PPCReg = preg;
ArmCRegs[lastRegIndex].LastLoad = 0;
regs[preg].LoadToReg(lastRegIndex);
return ArmCRegs[lastRegIndex].Reg;
}
@ -202,7 +206,6 @@ void ArmRegCache::Flush()
emit->STR(ArmCRegs[regindex].Reg, R9, PPCSTATE_OFF(gpr) + a * 4);
ArmCRegs[regindex].PPCReg = 33;
ArmCRegs[regindex].LastLoad = 0;
}
regs[a].Flush();