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 InegCommand extends AbstractInstructionCommand {
08:
09: public InegCommand(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:
22: Operand op1 = new Operand();
23: op1.setOperandValue("-" + "(" + op.getOperandValue() + ")");
24: boolean r = false;//checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
25: if (r) {
26: if (opStack.size() > 0) {
27: java.lang.String str = opStack.getTopOfStack()
28: .getOperandValue();
29: str = str + op1.getOperandValue();
30: op1.setOperandValue(str);
31: }
32: }
33: opStack.push(op1);
34: }
35:
36: }
|