fix inlined IO register access

This commit is contained in:
RSDuck 2020-05-12 16:09:20 +02:00 committed by RSDuck
parent e7d076403d
commit fea9f95bba
2 changed files with 4 additions and 3 deletions

View File

@ -134,7 +134,6 @@ void Compiler::Comp_JumpTo(Gen::X64Reg addr, bool restoreCPSR)
{ {
IrregularCycles = true; IrregularCycles = true;
BitSet16 hiRegsLoaded(RegCache.LoadedRegs & 0x7F00);
bool cpsrDirty = CPSRDirty; bool cpsrDirty = CPSRDirty;
SaveCPSR(); SaveCPSR();

View File

@ -283,8 +283,6 @@ void Compiler::Comp_MemAccess(int rd, int rn, const ComplexOperand& op2, int siz
} }
else else
{ {
PushRegs(false);
u32 maskedDataRegion; u32 maskedDataRegion;
if (addrIsStatic) if (addrIsStatic)
@ -309,6 +307,8 @@ void Compiler::Comp_MemAccess(int rd, int rn, const ComplexOperand& op2, int siz
if (flags & memop_Store) if (flags & memop_Store)
{ {
PushRegs(false);
MOV(32, R(ABI_PARAM2), rdMapped); MOV(32, R(ABI_PARAM2), rdMapped);
ABI_CallFunction((void(*)())func); ABI_CallFunction((void(*)())func);
@ -320,6 +320,8 @@ void Compiler::Comp_MemAccess(int rd, int rn, const ComplexOperand& op2, int siz
if (!addrIsStatic) if (!addrIsStatic)
MOV(32, rdMapped, R(RSCRATCH3)); MOV(32, rdMapped, R(RSCRATCH3));
PushRegs(false);
ABI_CallFunction((void(*)())func); ABI_CallFunction((void(*)())func);
PopRegs(false); PopRegs(false);