Jit64: Use MOV instead of ADD for updating imm Ra

The old code would first MOV the old imm into Ra and then do an ADD.
We can skip the ADD and just MOV the new imm.
This commit is contained in:
JosJuice 2022-11-20 10:23:43 +01:00
parent d7593dd721
commit 4b6bad2f9e
2 changed files with 4 additions and 4 deletions

View File

@ -505,10 +505,10 @@ void Jit64::stX(UGeckoInstruction inst)
}
else
{
RCOpArg Ra = gpr.UseNoImm(a, RCMode::ReadWrite);
RCOpArg Ra = gpr.UseNoImm(a, RCMode::Write);
RegCache::Realize(Ra);
MemoryExceptionCheck();
ADD(32, Ra, Imm32((u32)offset));
MOV(32, Ra, Imm32(addr));
}
}
}

View File

@ -144,10 +144,10 @@ void Jit64::stfXXX(UGeckoInstruction inst)
}
else
{
RCOpArg Ra = gpr.UseNoImm(a, RCMode::ReadWrite);
RCOpArg Ra = gpr.UseNoImm(a, RCMode::Write);
RegCache::Realize(Ra);
MemoryExceptionCheck();
ADD(32, Ra, Imm32((u32)imm));
MOV(32, Ra, Imm32(addr));
}
}
return;