GNIDA.mediana.movsx C# (CSharp) Method

movsx() static private method

static private movsx ( UInt64 &value, uint size1, uint size2 ) : void
value UInt64
size1 uint
size2 uint
return void
        internal static void movsx(ref UInt64 value, uint size1, uint size2)
        {
            UInt64 t = value;
            byte msb;
            if (size1 < size2)
            {
            for (int x = 1; x < size1; x++) t <<= 8;
            msb = (byte)t;
            if ((msb & 0x80) != 0) msb = 0xFF;else msb = 0x00;
            for (byte b = (byte)size1; b < size2; b++)
                value |= (UInt64)((msb)<<(b*8));
            }
        }

Same methods

mediana::movsx ( byte &value, uint size1, uint size2 ) : void