本文整理汇总了C#中de4dot.blocks.cflow.Int64Value.allBitsValid方法的典型用法代码示例。如果您正苦于以下问题:C# Int64Value.allBitsValid方法的具体用法?C# Int64Value.allBitsValid怎么用?C# Int64Value.allBitsValid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de4dot.blocks.cflow.Int64Value
的用法示例。
在下文中一共展示了Int64Value.allBitsValid方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: compareEq
public static Bool3 compareEq(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid())
return a.value == b.value ? Bool3.True : Bool3.False;
if (ReferenceEquals(a, b))
return Bool3.True;
if (((ulong)a.value & a.validMask & b.validMask) != ((ulong)b.value & a.validMask & b.validMask))
return Bool3.False;
return Bool3.Unknown;
}
示例3: 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();
}
示例4: Neg
public static Int64Value Neg(Int64Value a)
{
if (a.allBitsValid())
return new Int64Value(-a.value);
return createUnknown();
}
示例5: Rem_Un
public static Int64Value Rem_Un(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid()) {
try {
return new Int64Value((long)((ulong)a.value % (ulong)b.value));
}
catch (ArithmeticException) {
return createUnknown();
}
}
if ((ReferenceEquals(a, b) && a.isNonZero()) || b.hasValue(1))
return new Int64Value(0);
return createUnknown();
}
示例6: Div
public static Int64Value Div(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid()) {
try {
return new Int64Value(a.value / b.value);
}
catch (ArithmeticException) {
return createUnknown();
}
}
if (ReferenceEquals(a, b) && a.isNonZero())
return new Int64Value(1);
if (b.hasValue(1))
return a;
return createUnknown();
}
示例7: Mul
public static Int64Value Mul(Int64Value a, Int64Value b)
{
if (a.allBitsValid() && b.allBitsValid())
return new Int64Value(a.value * b.value);
if (a.isZero() || b.isZero())
return new Int64Value(0);
if (a.hasValue(1))
return b;
if (b.hasValue(1))
return a;
return createUnknown();
}
示例8: compareTrue
public static Bool3 compareTrue(Int64Value a)
{
if (a.allBitsValid())
return a.value != 0 ? Bool3.True : Bool3.False;
if (((ulong)a.value & a.validMask) != 0)
return Bool3.True;
return Bool3.Unknown;
}
示例9: compareLt_Un
public static Bool3 compareLt_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.False; // max < x => false
if (b.hasValue(ulong.MinValue))
return Bool3.False; // x < min => false
return Bool3.Unknown;
}
示例10: compareLe_Un
public static Bool3 compareLe_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.True; // min <= x => true
if (b.hasValue(ulong.MaxValue))
return Bool3.True; // x <= max => true
return Bool3.Unknown;
}
示例11: 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;
}
示例12: 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;
}