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