mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 08:54:15 +00:00
JIT64: use xor instead of mov for loading a zero regcache immediate
This commit is contained in:
parent
27996a65cf
commit
ad51fc7c4b
@ -299,7 +299,10 @@ void RegCache::StoreFromRegister(size_t i, FlushMode mode)
|
|||||||
|
|
||||||
void GPRRegCache::LoadRegister(size_t preg, X64Reg newLoc)
|
void GPRRegCache::LoadRegister(size_t preg, X64Reg newLoc)
|
||||||
{
|
{
|
||||||
emit->MOV(32, ::Gen::R(newLoc), regs[preg].location);
|
if (regs[preg].location.IsImm() && !regs[preg].location.offset)
|
||||||
|
emit->XOR(32, ::Gen::R(newLoc), ::Gen::R(newLoc));
|
||||||
|
else
|
||||||
|
emit->MOV(32, ::Gen::R(newLoc), regs[preg].location);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPRRegCache::StoreRegister(size_t preg, OpArg newLoc)
|
void GPRRegCache::StoreRegister(size_t preg, OpArg newLoc)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user