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 LdivCommand extends AbstractInstructionCommand {
08:
09: public LdivCommand(Behaviour context) {
10: super (context);
11:
12: }
13:
14: public int getSkipBytes() {
15: return 0;
16: }
17:
18: public void execute() {
19: OperandStack stack = getStack();
20: Operand operand1 = stack.getTopOfStack();
21: Operand operand2 = stack.getTopOfStack();
22: java.lang.String result = "(" + operand2.getOperandValue()
23: + "/" + operand1.getOperandValue() + ")";
24: Operand op = new Operand();
25: op.setOperandValue(result);
26:
27: boolean r = false;//checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
28: if (r) {
29: if (stack.size() > 0) {
30: java.lang.String str = stack.getTopOfStack()
31: .getOperandValue();
32: str = str + op.getOperandValue();
33: op.setOperandValue(str);
34: }
35: }
36: stack.push(op);
37: }
38:
39: }
|