mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-17 07:49:21 +00:00
Jit64: boolX - Special case or with 0
Bitwise or with zero is just a fancy MOV, really. - Example 1 Before: 41 BA 00 00 00 00 mov r10d,0 45 0B D1 or r10d,r9d After: 45 8B D1 mov r10d,r9d - Example 2 Before: 41 83 CA 00 or r10d,0 After: Nothing!
This commit is contained in:
parent
356172bc98
commit
62f80a008c
1 changed files with 14 additions and 5 deletions
|
@ -766,7 +766,15 @@ void Jit64::boolX(UGeckoInstruction inst)
|
||||||
RCX64Reg Ra = gpr.Bind(a, RCMode::Write);
|
RCX64Reg Ra = gpr.Bind(a, RCMode::Write);
|
||||||
RegCache::Realize(Rj, Ra);
|
RegCache::Realize(Rj, Ra);
|
||||||
|
|
||||||
if (complement_b)
|
if (imm == 0)
|
||||||
|
{
|
||||||
|
if (a != j)
|
||||||
|
MOV(32, Ra, Rj);
|
||||||
|
if (final_not || complement_b)
|
||||||
|
NOT(32, Ra);
|
||||||
|
needs_test = true;
|
||||||
|
}
|
||||||
|
else if (complement_b)
|
||||||
{
|
{
|
||||||
if (a != j)
|
if (a != j)
|
||||||
MOV(32, Ra, Rj);
|
MOV(32, Ra, Rj);
|
||||||
|
@ -778,13 +786,14 @@ void Jit64::boolX(UGeckoInstruction inst)
|
||||||
if (a != j)
|
if (a != j)
|
||||||
MOV(32, Ra, Rj);
|
MOV(32, Ra, Rj);
|
||||||
OR(32, Ra, Imm32(imm));
|
OR(32, Ra, Imm32(imm));
|
||||||
}
|
|
||||||
|
|
||||||
if (final_not) {
|
if (final_not)
|
||||||
|
{
|
||||||
NOT(32, Ra);
|
NOT(32, Ra);
|
||||||
needs_test = true;
|
needs_test = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PanicAlertFmt("WTF!");
|
PanicAlertFmt("WTF!");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue