本文整理汇总了C#中de4dot.blocks.cflow.Int32Value.hasUnknownBits方法的典型用法代码示例。如果您正苦于以下问题:C# Int32Value.hasUnknownBits方法的具体用法?C# Int32Value.hasUnknownBits怎么用?C# Int32Value.hasUnknownBits使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de4dot.blocks.cflow.Int32Value
的用法示例。
在下文中一共展示了Int32Value.hasUnknownBits方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Shr
public static Int32Value Shr(Int32Value a, Int32Value b)
{
if (b.hasUnknownBits())
return createUnknown();
if (b.value == 0)
return a;
if (b.value < 0 || b.value >= sizeof(int) * 8)
return createUnknown();
int shift = b.value;
uint validMask = a.validMask >> shift;
if (a.isBitValid(sizeof(int) * 8 - 1))
validMask |= (uint.MaxValue << (sizeof(int) * 8 - shift));
return new Int32Value(a.value >> shift, validMask);
}
示例2: Shr_Un
public static Int32Value Shr_Un(Int32Value a, Int32Value b)
{
if (b.hasUnknownBits())
return createUnknown();
if (b.value == 0)
return a;
if (b.value < 0 || b.value >= sizeof(int) * 8)
return createUnknown();
int shift = b.value;
uint validMask = (a.validMask >> shift) | (uint.MaxValue << (sizeof(int) * 8 - shift));
return new Int32Value((int)((uint)a.value >> shift), validMask);
}
示例3: Shl
public static Int64Value Shl(Int64Value a, Int32Value b)
{
if (b.hasUnknownBits())
return createUnknown();
if (b.value == 0)
return a;
if (b.value < 0 || b.value >= sizeof(long) * 8)
return createUnknown();
int shift = b.value;
ulong validMask = (a.validMask << shift) | (ulong.MaxValue >> (sizeof(long) * 8 - shift));
return new Int64Value(a.value << shift, validMask);
}