Began thinking about this branch thing

This commit is contained in:
Adam
2016-01-13 10:31:33 -05:00
parent 47b30983cb
commit 99c51051fe
2 changed files with 30 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ public abstract class If extends Instruction implements JumpingInstruction, Comp
}
@Override
public final/*XXX tmp*/ void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other)
public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other)
{
// InstructionContext oneLhs = ctx.getPops().get(0).getPushed().resolve(ctx.getPops().get(0)),
// oneRhs = ctx.getPops().get(1).getPushed().resolve(ctx.getPops().get(1)),

View File

@@ -2,6 +2,8 @@ package net.runelite.deob.attributes.code.instructions;
import net.runelite.deob.attributes.code.InstructionType;
import net.runelite.deob.attributes.code.Instructions;
import net.runelite.deob.deobfuscators.rename.ParallelExecutorMapping;
import net.runelite.deob.execution.InstructionContext;
public class IfCmpGt extends If
{
@@ -10,4 +12,31 @@ public class IfCmpGt extends If
super(instructions, type, pc);
}
@Override
public boolean isSame(InstructionContext thisIc, InstructionContext otherIc)
{
if (super.isSame(thisIc, otherIc))
return true;
if (otherIc.getInstruction() instanceof IfCmpLe)
{
return true;
//this is equal, but the branching is different
}
return false;
}
@Override
public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other)
{
if (other.getInstruction() instanceof IfCmpLe)
{
}
else
{
//super.ma
}
}
}