mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-18 14:18:11 +00:00
Issue #1008 pushshort instruction diassembly fix
This commit is contained in:
@@ -332,6 +332,8 @@ public class AVM2Code implements Cloneable {
|
||||
|
||||
public static final int OPT_BYTE = 0x500;
|
||||
|
||||
public static final int OPT_U30_SHORT = 0x600;
|
||||
|
||||
public static final int DAT_MULTINAME_INDEX = OPT_U30 + 0x01;
|
||||
|
||||
public static final int DAT_ARG_COUNT = OPT_U30 + 0x02;
|
||||
@@ -876,6 +878,9 @@ public class AVM2Code implements Cloneable {
|
||||
case OPT_U30:
|
||||
actualOperands[op] = ais.readU30("operand");
|
||||
break;
|
||||
case OPT_U30_SHORT:
|
||||
actualOperands[op] = (short) ais.readU30("operand");
|
||||
break;
|
||||
case OPT_U8:
|
||||
actualOperands[op] = ais.read("operand");
|
||||
break;
|
||||
|
||||
@@ -88,6 +88,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
aos.writeS24(operands[i]);
|
||||
break;
|
||||
case AVM2Code.OPT_U30:
|
||||
case AVM2Code.OPT_U30_SHORT:
|
||||
aos.writeU30(operands[i]);
|
||||
break;
|
||||
case AVM2Code.OPT_U8:
|
||||
@@ -120,6 +121,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
|
||||
cnt += 3;
|
||||
break;
|
||||
case AVM2Code.OPT_U30:
|
||||
case AVM2Code.OPT_U30_SHORT:
|
||||
cnt += ABCOutputStream.getU30ByteLength(operands[i]);
|
||||
break;
|
||||
case AVM2Code.OPT_U8:
|
||||
|
||||
@@ -68,6 +68,9 @@ public abstract class InstructionDefinition implements Serializable {
|
||||
if ((operands[i] & 0xff00) == AVM2Code.OPT_U30) {
|
||||
s.append(" U30");
|
||||
}
|
||||
if ((operands[i] & 0xff00) == AVM2Code.OPT_U30_SHORT) {
|
||||
s.append(" U30");
|
||||
}
|
||||
if ((operands[i] & 0xff00) == AVM2Code.OPT_U8) {
|
||||
s.append(" U8");
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.util.List;
|
||||
public class PushShortIns extends InstructionDefinition implements PushIntegerTypeIns {
|
||||
|
||||
public PushShortIns() {
|
||||
super(0x25, "pushshort", new int[]{AVM2Code.OPT_U30}, false);
|
||||
super(0x25, "pushshort", new int[]{AVM2Code.OPT_U30_SHORT}, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user