diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java index 8147d6657..5a17e909d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/LShiftIns.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.operations.LShiftAVM2Item; @@ -36,6 +37,14 @@ public class LShiftIns extends InstructionDefinition { super(0xa5, "lshift", new int[]{}, true); } + @Override + public void execute(LocalDataArea lda, AVM2ConstantPool constants, List arguments) { + int value2 = (int) ((Long) lda.operandStack.pop() & 0x1F); + int value1 = ((Long) lda.operandStack.pop()).intValue(); + Long value3 = (long) (value1 << value2); + lda.operandStack.push(value3); + } + @Override public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2ConstantPool constants, AVM2Instruction ins, List method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path, HashMap localRegsAssignmentIps, int ip, HashMap> refs, AVM2Code code) { GraphTargetItem v2 = stack.pop(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java index 6f0d1599c..18077a233 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/RShiftIns.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.operations.RShiftAVM2Item; @@ -36,6 +37,14 @@ public class RShiftIns extends InstructionDefinition { super(0xa6, "rshift", new int[]{}, true); } + @Override + public void execute(LocalDataArea lda, AVM2ConstantPool constants, List arguments) { + int value2 = (int) ((Long) lda.operandStack.pop() & 0x1F); + int value1 = ((Long) lda.operandStack.pop()).intValue(); + Long value3 = (long) (value1 >> value2); + lda.operandStack.push(value3); + } + @Override public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2ConstantPool constants, AVM2Instruction ins, List method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path, HashMap localRegsAssignmentIps, int ip, HashMap> refs, AVM2Code code) { GraphTargetItem v2 = stack.pop(); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java index d99b30da3..dfd17da4b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/bitwise/URShiftIns.java @@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions.bitwise; import com.jpexs.decompiler.flash.abc.ABC; import com.jpexs.decompiler.flash.abc.avm2.AVM2Code; import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool; +import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea; import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction; import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition; import com.jpexs.decompiler.flash.abc.avm2.model.operations.URShiftAVM2Item; @@ -36,6 +37,14 @@ public class URShiftIns extends InstructionDefinition { super(0xa7, "urshift", new int[]{}, true); } + @Override + public void execute(LocalDataArea lda, AVM2ConstantPool constants, List arguments) { + Long value2 = ((Long) lda.operandStack.pop() & 0x1F); + Long value1 = (Long) lda.operandStack.pop(); + Long value3 = value1 >>> value2; + lda.operandStack.push(value3); + } + @Override public void translate(boolean isStatic, int scriptIndex, int classIndex, HashMap localRegs, TranslateStack stack, ScopeStack scopeStack, AVM2ConstantPool constants, AVM2Instruction ins, List method_info, List output, MethodBody body, ABC abc, HashMap localRegNames, List fullyQualifiedNames, String path, HashMap localRegsAssignmentIps, int ip, HashMap> refs, AVM2Code code) { GraphTargetItem v2 = stack.pop();