JIT: merge lbz + extsb

PPC has no 8-bit sign-extended load, so this instruction pair is very common.
x86 can do it in one op (movsx), so merge them when possible.
This commit is contained in:
Fiora 2014-09-15 08:17:46 -07:00
parent 7f1185b941
commit de86d2003a

View File

@ -94,6 +94,15 @@ void Jit64::lXXx(UGeckoInstruction inst)
PanicAlert("Invalid instruction");
}
// PowerPC has no 8-bit sign extended load, but x86 does, so merge extsb with the load if we find it.
if (accessSize == 8 && js.next_inst.OPCD == 31 && js.next_inst.SUBOP10 == 954 &&
js.next_inst.RS == inst.RD && js.next_inst.RA == inst.RD && !js.next_inst.Rc)
{
js.downcountAmount++;
js.skipnext = true;
signExtend = true;
}
// TODO(ector): Make it dynamically enable/disable idle skipping where appropriate
// Will give nice boost to dual core mode
// (mb2): I agree,