mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Merge pull request #8133 from Sintendo/mov64imm32
x64Emitter: Emit shorter MOVs for 32-bit immediates
This commit is contained in:
@ -1591,8 +1591,9 @@ void XEmitter::XOR(int bits, const OpArg& a1, const OpArg& a2)
|
||||
}
|
||||
void XEmitter::MOV(int bits, const OpArg& a1, const OpArg& a2)
|
||||
{
|
||||
if (bits == 64 && a1.IsSimpleReg() && a2.scale == SCALE_IMM64 &&
|
||||
a2.offset == static_cast<u32>(a2.offset))
|
||||
if (bits == 64 && a1.IsSimpleReg() &&
|
||||
((a2.scale == SCALE_IMM64 && a2.offset == static_cast<u32>(a2.offset)) ||
|
||||
(a2.scale == SCALE_IMM32 && static_cast<s32>(a2.offset) >= 0)))
|
||||
{
|
||||
WriteNormalOp(32, NormalOp::MOV, a1, a2.AsImm32());
|
||||
return;
|
||||
|
Reference in New Issue
Block a user