mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 11:38:49 -06:00
Jit64: boolX - Special case and with 0
Bitwise and with zero is always zero. Before: 45 8B F8 mov r15d,r8d 41 83 E7 00 and r15d,0 After: Nothing, register a is set to constant 0.
This commit is contained in:
@ -713,6 +713,10 @@ void Jit64::boolX(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (is_and)
|
else if (is_and)
|
||||||
|
{
|
||||||
|
if (imm == 0)
|
||||||
|
gpr.SetImmediate32(a, final_not ? 0xFFFFFFFF : 0);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
RCOpArg Rj = gpr.Use(j, RCMode::Read);
|
RCOpArg Rj = gpr.Use(j, RCMode::Read);
|
||||||
RCX64Reg Ra = gpr.Bind(a, RCMode::Write);
|
RCX64Reg Ra = gpr.Bind(a, RCMode::Write);
|
||||||
@ -732,11 +736,13 @@ void Jit64::boolX(UGeckoInstruction inst)
|
|||||||
AND(32, Ra, Imm32(imm));
|
AND(32, Ra, Imm32(imm));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (final_not) {
|
if (final_not)
|
||||||
|
{
|
||||||
NOT(32, Ra);
|
NOT(32, Ra);
|
||||||
needs_test = true;
|
needs_test = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (is_or)
|
else if (is_or)
|
||||||
{
|
{
|
||||||
RCOpArg Rj = gpr.Use(j, RCMode::Read);
|
RCOpArg Rj = gpr.Use(j, RCMode::Read);
|
||||||
|
Reference in New Issue
Block a user