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: import net.sf.jdec.util.Constants;
07:
08: public class ImulCommand extends AbstractInstructionCommand {
09:
10: public ImulCommand(Behaviour context) {
11: super (context);
12:
13: }
14:
15: public int getSkipBytes() {
16: return 0;
17: }
18:
19: public void execute() {
20: OperandStack opStack = getStack();
21: Operand op, op1, op2;
22: op = (Operand) opStack.pop();
23: op1 = (Operand) opStack.pop();
24:
25: op2 = new Operand();
26: op2.setOperandValue(op1.getOperandValue() + "*"
27: + op.getOperandValue());
28: op2.setOperandType(Constants.IS_CONSTANT_INT);
29: op2.setCategory(Constants.CATEGORY1);
30: boolean r = false;//checkIFLoadInstIsPartOFTernaryCond(currentForIndex);
31: if (r) {
32: if (opStack.size() > 0) {
33: java.lang.String str = opStack.getTopOfStack()
34: .getOperandValue();
35: str = str + op2.getOperandValue();
36: op2.setOperandValue(str);
37: }
38: }
39: opStack.push(op2);
40: }
41:
42: }
|