예제 #1
0
        private static bool IsLongConst(Operand operand)
        {
            long value = operand.Type == OperandType.I32
                ? operand.AsInt32()
                : operand.AsInt64();

            return(!ConstFitsOnS32(value));
        }
예제 #2
0
        private static Operand GetIntConst(Operand value)
        {
            if (value.Type == OperandType.FP32)
            {
                return(Const(value.AsInt32()));
            }
            else if (value.Type == OperandType.FP64)
            {
                return(Const(value.AsInt64()));
            }

            return(value);
        }