Jit_Integer: Handle NOP case where RA == RS for ori

ori can be used as a NOP if the two register operands are the same, and
the immediate is zero, not only if the two register operands are r0.

Also removes the check for !inst.Rc, as ori only has one encoding, and
said encoding doesn't even have a record bit in it.
This commit is contained in:
Lioncash 2018-03-22 15:20:45 -04:00
parent 59c5bc964f
commit 42fce74f39
2 changed files with 5 additions and 4 deletions

View File

@ -304,8 +304,8 @@ void Jit64::reg_imm(UGeckoInstruction inst)
case 15: // addis
regimmop(d, a, false, (u32)inst.SIMM_16 << 16, Add, &XEmitter::ADD);
break;
case 24: // ori
if (a == 0 && s == 0 && inst.UIMM == 0 && !inst.Rc) // check for nop
case 24: // ori
if (a == s && inst.UIMM == 0) // check for nop
{
// Make the nop visible in the generated code. not much use but interesting if we see one.
NOP();

View File

@ -121,8 +121,9 @@ void JitArm64::arith_imm(UGeckoInstruction inst)
switch (inst.OPCD)
{
case 24: // ori
if (a == 0 && s == 0 && inst.UIMM == 0 && !inst.Rc) // check for nop
case 24: // ori
// check for nop
if (a == s && inst.UIMM == 0)
{
// NOP
return;