本文整理汇总了C#中de4dot.blocks.cflow.Int64Value类的典型用法代码示例。如果您正苦于以下问题:C# Int64Value类的具体用法?C# Int64Value怎么用?C# Int64Value使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Int64Value类属于de4dot.blocks.cflow命名空间,在下文中一共展示了Int64Value类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Add
public static Int64Value Add(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid())
return new Int64Value(a.value + b.value);
if (ReferenceEquals(a, b))
return new Int64Value(a.value << 1, (a.validMask << 1) | 1);
return createUnknown();
}
示例2: Clt
public static Int32Value Clt(Int64Value a, Int64Value b) {
return Create(CompareLt(a, b));
}
示例3: Conv_I2
public static Int32Value Conv_I2(Int64Value a) {
return Conv_I2((int)a.Value, (uint)a.ValidMask);
}
示例4: Clt_Un
public static Int32Value Clt_Un(Int64Value a, Int64Value b)
{
return create(compareLt_Un(a, b));
}
示例5: Ceq
public static Int32Value Ceq(Int64Value a, Int64Value b)
{
return create(compareEq(a, b));
}
示例6: Shr
public static Int64Value Shr(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;
if (a.isBitValid(sizeof(long) * 8 - 1))
validMask |= (ulong.MaxValue << (sizeof(long) * 8 - shift));
return new Int64Value(a.value >> shift, validMask);
}
示例7: Sub
public static Int64Value Sub(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid())
return new Int64Value(a.value - b.value);
if (ReferenceEquals(a, b))
return new Int64Value(0);
return createUnknown();
}
示例8: compareGe
public static Bool3 compareGe(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid())
return a.value >= b.value ? Bool3.True : Bool3.False;
if (a.hasValue(long.MaxValue))
return Bool3.True; // max >= x => true
if (b.hasValue(long.MinValue))
return Bool3.True; // x >= min => true
return Bool3.Unknown;
}
示例9: compareGt
public static Bool3 compareGt(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid())
return a.value > b.value ? Bool3.True : Bool3.False;
if (a.hasValue(long.MinValue))
return Bool3.False; // min > x => false
if (b.hasValue(long.MaxValue))
return Bool3.False; // x > max => false
return Bool3.Unknown;
}
示例10: CompareLt
public static Bool3 CompareLt(Int64Value a, Int64Value b) {
if (a.AllBitsValid() && b.AllBitsValid())
return a.Value < b.Value ? Bool3.True : Bool3.False;
if (a.HasValue(long.MaxValue))
return Bool3.False; // max < x => false
if (b.HasValue(long.MinValue))
return Bool3.False; // x < min => false
return Bool3.Unknown;
}
示例11: CompareFalse
public static Bool3 CompareFalse(Int64Value a) {
if (a.AllBitsValid())
return a.Value == 0 ? Bool3.True : Bool3.False;
if (((ulong)a.Value & a.ValidMask) != 0)
return Bool3.False;
return Bool3.Unknown;
}
示例12: CompareLe
public static Bool3 CompareLe(Int64Value a, Int64Value b) {
if (a.AllBitsValid() && b.AllBitsValid())
return a.Value <= b.Value ? Bool3.True : Bool3.False;
if (a.HasValue(long.MinValue))
return Bool3.True; // min <= x => true
if (b.HasValue(long.MaxValue))
return Bool3.True; // x <= max => true
return Bool3.Unknown;
}
示例13: CompareGe_Un
public static Bool3 CompareGe_Un(Int64Value a, Int64Value b) {
if (a.AllBitsValid() && b.AllBitsValid())
return (ulong)a.Value >= (ulong)b.Value ? Bool3.True : Bool3.False;
if (a.HasValue(ulong.MaxValue))
return Bool3.True; // max >= x => true
if (b.HasValue(ulong.MinValue))
return Bool3.True; // x >= min => true
return Bool3.Unknown;
}
示例14: CompareGt_Un
public static Bool3 CompareGt_Un(Int64Value a, Int64Value b) {
if (a.AllBitsValid() && b.AllBitsValid())
return (ulong)a.Value > (ulong)b.Value ? Bool3.True : Bool3.False;
if (a.HasValue(ulong.MinValue))
return Bool3.False; // min > x => false
if (b.HasValue(ulong.MaxValue))
return Bool3.False; // x > max => false
return Bool3.Unknown;
}
示例15: Not
public static Int64Value Not(Int64Value a)
{
return new Int64Value(~a.value, a.validMask);
}