Refactor prep: Split JitInterface into MIPSFrontendInterface and JitInterface

This commit is contained in:
Henrik Rydgard committed 2016-05-09 19:41:39 +02:00
1 parent f50617d679
commit 6e44e97ffa
11 files changed
+44 -32

No files matched your search

+4
View File
@@ -121,6 +121,10 @@ bool PropagateConstants(const IRWriter &in, IRWriter &out) {
case IROp::And:
case IROp::Or:
case IROp::Xor:
// Regularize, for the add/or check below.
if (symmetric && inst.src2 == inst.dest && inst.src1 != inst.src2) {
std::swap(inst.src1, inst.src2);
}
if (gpr.IsImm(inst.src1) && gpr.IsImm(inst.src2)) {
gpr.SetImm(inst.dest, Evaluate(gpr.GetImm(inst.src1), gpr.GetImm(inst.src2), inst.op));
} else if (gpr.IsImm(inst.src2)) {