More instructions

This commit is contained in:
Adam
2014-12-03 14:50:21 -05:00
parent 81095be5da
commit 98b4025a81
38 changed files with 960 additions and 39 deletions

View File

@@ -99,43 +99,43 @@ public enum InstructionType
DUP2(0x5c, "dup2", Dup2.class),
DUP2_X1(0x5d, "dup2_x1", Dup2_X1.class),
DUP2_X2(0x5e, "dup2_x2", Dup2_X2.class),
SWAP(0x5f, "swap", Instruction.class),
IADD(0x60, "iadd", Instruction.class),
LADD(0x61, "ladd", Instruction.class),
FADD(0x62, "fadd", Instruction.class),
DADD(0x63, "dadd", Instruction.class),
ISUB(0x64, "isub", Instruction.class),
LSUB(0x65, "lsub", Instruction.class),
FSUB(0x66, "fsub", Instruction.class),
DSUB(0x67, "dsub", Instruction.class),
SWAP(0x5f, "swap", Swap.class),
IADD(0x60, "iadd", IAdd.class),
LADD(0x61, "ladd", LAdd.class),
FADD(0x62, "fadd", FAdd.class),
DADD(0x63, "dadd", DAdd.class),
ISUB(0x64, "isub", ISub.class),
LSUB(0x65, "lsub", LSub.class),
FSUB(0x66, "fsub", FSub.class),
DSUB(0x67, "dsub", DSub.class),
IMUL(0x68, "imul", IMul.class),
LMUL(0x69, "lmul", Instruction.class),
FMUL(0x6a, "fmul", Instruction.class),
DMUL(0x6b, "dmul", Instruction.class),
IDIV(0x6c, "idiv", Instruction.class),
LDIV(0x6d, "ldiv", Instruction.class),
FDIV(0x6e, "fdiv", Instruction.class),
DDIV(0x6f, "ddiv", Instruction.class),
IREM(0x70, "irem", Instruction.class),
LREM(0x71, "lrem", Instruction.class),
FREM(0x72, "frem", Instruction.class),
DREM(0x73, "drem", Instruction.class),
INEG(0x74, "ineg", Instruction.class),
LNEG(0x75, "lneg", Instruction.class),
FNEG(0x76, "fneg", Instruction.class),
DNEG(0x77, "dneg", Instruction.class),
ISHL(0x78, "ishl", Instruction.class),
LSHL(0x79, "lshl", Instruction.class),
ISHR(0x7a, "ishr", Instruction.class),
LSHR(0x7b, "lshr", Instruction.class),
IUSHR(0x7c, "iushr", Instruction.class),
LUSHR(0x7d, "lushr", Instruction.class),
IAND(0x7e, "iand", Instruction.class),
LAND(0x7f, "land", Instruction.class),
IOR(0x80, "ior", Instruction.class),
LOR(0x81, "lor", Instruction.class),
IXOR(0x82, "ixor", Instruction.class),
LXOR(0x83, "lxor", Instruction.class),
LMUL(0x69, "lmul", LMul.class),
FMUL(0x6a, "fmul", FMul.class),
DMUL(0x6b, "dmul", DMul.class),
IDIV(0x6c, "idiv", IDiv.class),
LDIV(0x6d, "ldiv", LDiv.class),
FDIV(0x6e, "fdiv", FDiv.class),
DDIV(0x6f, "ddiv", DDiv.class),
IREM(0x70, "irem", IRem.class),
LREM(0x71, "lrem", LRem.class),
FREM(0x72, "frem", FRem.class),
DREM(0x73, "drem", DRem.class),
INEG(0x74, "ineg", INeg.class),
LNEG(0x75, "lneg", LNeg.class),
FNEG(0x76, "fneg", FNeg.class),
DNEG(0x77, "dneg", DNeg.class),
ISHL(0x78, "ishl", IShL.class),
LSHL(0x79, "lshl", LShL.class),
ISHR(0x7a, "ishr", IShR.class),
LSHR(0x7b, "lshr", LShR.class),
IUSHR(0x7c, "iushr", IUShR.class),
LUSHR(0x7d, "lushr", LUShR.class),
IAND(0x7e, "iand", IAnd.class),
LAND(0x7f, "land", LAnd.class),
IOR(0x80, "ior", IOr.class),
LOR(0x81, "lor", LOr.class),
IXOR(0x82, "ixor", IXor.class),
LXOR(0x83, "lxor", LXor.class),
IINC(0x84, "iinc", IInc.class),
I2L(0x85, "i2l", I2L.class),
I2F(0x86, "i2f", I2F.class),

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DAdd extends Instruction
{
public DAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DDiv extends Instruction
{
public DDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one / two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DMul extends Instruction
{
public DMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DNeg extends Instruction
{
public DNeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double value = (Double) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DRem extends Instruction
{
public DRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class DSub extends Instruction
{
public DSub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FAdd extends Instruction
{
public FAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float one = (Float) stack.pop();
Float two = (Float) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FDiv extends Instruction
{
public FDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one / two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FMul extends Instruction
{
public FMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FNeg extends Instruction
{
public FNeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float value = (Float) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FRem extends Instruction
{
public FRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class FSub extends Instruction
{
public FSub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Float two = (Float) stack.pop();
Float one = (Float) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IAdd extends Instruction
{
public IAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IAnd extends Instruction
{
public IAnd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one & two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IDiv extends Instruction
{
public IDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Double two = (Double) stack.pop();
Double one = (Double) stack.pop();
stack.push(one / two);
}
}

View File

@@ -4,6 +4,7 @@ import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IMul extends Instruction
{
@@ -15,8 +16,11 @@ public class IMul extends Instruction
@Override
public void execute(Frame frame)
{
Integer one = (Integer) frame.getStack().pop(), two = (Integer) frame.getStack().pop();
int result = one.intValue() * two.intValue();
frame.getStack().push(result);
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class INeg extends Instruction
{
public INeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer value = (Integer) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IOr extends Instruction
{
public IOr(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one | two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IRem extends Instruction
{
public IRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IShL extends Instruction
{
public IShL(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one << (two & 0x1F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IShR extends Instruction
{
public IShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one >> (two & 0x1F));
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class ISub extends Instruction
{
public ISub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IUShR extends Instruction
{
public IUShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one >>> (two & 0x1F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class IXor extends Instruction
{
public IXor(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Integer two = (Integer) stack.pop();
Integer one = (Integer) stack.pop();
stack.push(one ^ two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LAdd extends Instruction
{
public LAdd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one + two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LAnd extends Instruction
{
public LAnd(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one & two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LDiv extends Instruction
{
public LDiv(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one / two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LMul extends Instruction
{
public LMul(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one * two);
}
}

View File

@@ -0,0 +1,24 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LNeg extends Instruction
{
public LNeg(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long value = (Long) stack.pop();
stack.push(-value);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LOr extends Instruction
{
public LOr(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one | two);
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LRem extends Instruction
{
public LRem(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one % two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LShL extends Instruction
{
public LShL(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one << (two & 0x3F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LShR extends Instruction
{
public LShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one >> (two & 0x3F));
}
}

View File

@@ -0,0 +1,26 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LSub extends Instruction
{
public LSub(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one - two);
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LUShR extends Instruction
{
public LUShR(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one >>> (two & 0x3F));
}
}

View File

@@ -0,0 +1,25 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class LXor extends Instruction
{
public LXor(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Long two = (Long) stack.pop();
Long one = (Long) stack.pop();
stack.push(one ^ two);
}
}

View File

@@ -0,0 +1,27 @@
package info.sigterm.deob.attributes.code.instructions;
import info.sigterm.deob.attributes.code.Instruction;
import info.sigterm.deob.attributes.code.InstructionType;
import info.sigterm.deob.attributes.code.Instructions;
import info.sigterm.deob.execution.Frame;
import info.sigterm.deob.execution.Stack;
public class Swap extends Instruction
{
public Swap(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
@Override
public void execute(Frame frame)
{
Stack stack = frame.getStack();
Object one = stack.pop();
Object two = stack.pop();
stack.push(one);
stack.push(two);
}
}