This PR solves some InvalidProgramExceptions, which is thrown when executing broken IL.
Modifications are:
Stopped using unaligned. 8 IL instruction. Because 8-byte alignment is not supported in .NET, using unaligned. 8 caused an InvalidProgramException. Because 8-byte alignment is subset of 4-byte alignment, it was safely replaced by default 4-byte alignment.
This problem was noted in yself's comment comment of #21.
This PR solves some
InvalidProgramException
s, which is thrown when executing broken IL. Modifications are:unaligned. 8
IL instruction. Because 8-byte alignment is not supported in .NET, usingunaligned. 8
caused anInvalidProgramException
. Because 8-byte alignment is subset of 4-byte alignment, it was safely replaced by default 4-byte alignment.i64.(shl|shr|shr_s)
instructions, I added type conversion of shift amount operand. This is because IL shift instructions only support 32-bit shift amount.i64.clz
instruction, an explicit conversion fromint32
toint64
was added.dotnet-webassembly
on Unity through forcibly compiling for .NET Framework 4.7.1.