本文整理汇总了C#中Constant.ToUInt64方法的典型用法代码示例。如果您正苦于以下问题:C# Constant.ToUInt64方法的具体用法?C# Constant.ToUInt64怎么用?C# Constant.ToUInt64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Constant
的用法示例。
在下文中一共展示了Constant.ToUInt64方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyConstants
public override Constant ApplyConstants(Constant c1, Constant c2)
{
if (!ValidArgs(c1, c2))
return Constant.Invalid;
return BuildConstant(c1.DataType, c2.DataType, (int) (c1.ToUInt64() - c2.ToUInt64()));
}
示例2: SetRegister
public override void SetRegister(RegisterStorage reg, Constant v)
{
if (v.IsValid)
{
valid[reg.Number] = false;
}
else
{
valid[reg.Number] = true;
regs[reg.Number] = v.ToUInt64();
}
}
示例3: SetRegister
public override void SetRegister(RegisterStorage reg, Constant c)
{
if (c == null || !c.IsValid)
{
valid[reg.Number] &= ~reg.BitMask;
}
else
{
valid[reg.Number] |= reg.BitMask;
var val = (regs[reg.Number] & ~reg.BitMask) | (c.ToUInt64() & reg.BitMask);
regs[reg.Number] = val;
}
}
示例4: MakeAddressFromConstant
public override Address MakeAddressFromConstant(Constant c)
{
return Address.Ptr64(c.ToUInt64());
}
示例5: FormatUnsignedValue
public static string FormatUnsignedValue(Constant c)
{
return c.ToUInt64().ToString(FormatString(c.DataType));
}
示例6: SetRegister
public override void SetRegister(RegisterStorage reg, Constant c)
{
if (c == null || !c.IsValid)
{
valid[reg.Number] = false;
}
else
{
reg.SetRegisterFileValues(regs, c.ToUInt64(), valid);
}
}
示例7: GetSliceImpl
protected override Expression GetSliceImpl(Constant c)
{
return Constant.Word64(c.ToUInt64());
}
示例8: ApplyConstants
public override Constant ApplyConstants(Constant c1, Constant c2)
{
return BuildConstant(c1.DataType, c2.DataType, (int) (c1.ToUInt64() - c2.ToUInt64()));
}
示例9: SetRegister
public override void SetRegister(RegisterStorage reg, Constant c)
{
if (c == null || !c.IsValid)
{
valid[reg.Number] &= ~reg.BitMask;
}
else
{
valid[reg.Number] |= reg.BitMask;
regs[reg.Number] = (regs[reg.Number] & ~reg.BitMask) | (c.ToUInt64() << (int)reg.BitAddress);
}
}