01: package net.sf.jdec.jvminstructions.commands;
02:
03: import net.sf.jdec.core.Operand;
04: import net.sf.jdec.core.OperandStack;
05: import net.sf.jdec.reflection.Behaviour;
06:
07: public class ISubCommand extends AbstractInstructionCommand {
08:
09: public ISubCommand(Behaviour context) {
10: super (context);
11:
12: }
13:
14: public int getSkipBytes() {
15: return 0;
16: }
17:
18: public void execute() {
19: OperandStack opStack = getStack();
20: Operand op = (Operand) opStack.pop();
21: Operand op1 = (Operand) opStack.pop();
22:
23: Operand op2 = new Operand();
24: op2.setOperandValue("(" + op1.getOperandValue() + "- "
25: + op.getOperandValue() + ")");
26: boolean r = false;// checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
27: if (r) {
28: if (opStack.size() > 0) {
29: java.lang.String str = opStack.getTopOfStack()
30: .getOperandValue();
31: str = str + op2.getOperandValue();
32: op2.setOperandValue(str);
33: }
34: }
35: opStack.push(op2);
36: }
37:
38: }
|