当前位置: 首页>>代码示例>>C#>>正文


C# Constant.ToUInt32方法代码示例

本文整理汇总了C#中Constant.ToUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# Constant.ToUInt32方法的具体用法?C# Constant.ToUInt32怎么用?C# Constant.ToUInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Constant的用法示例。


在下文中一共展示了Constant.ToUInt32方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ApplyConstants

		public override Constant ApplyConstants(Constant c1, Constant c2)
		{
            if (!ValidArgs(c1, c2))
                return Constant.Invalid;
            if (c2.IsIntegerZero)
                return Constant.Invalid;
            return BuildConstant(c1.DataType, c2.DataType, (int) (c1.ToUInt32() / c2.ToUInt32()));
		}
开发者ID:relaxar,项目名称:reko,代码行数:8,代码来源:UDivOperator.cs

示例2: ApplyConstants

		public override Constant ApplyConstants(Constant c1, Constant c2)
		{
            if (!ValidArgs(c1, c2))
                return Constant.Invalid;
            uint v1 = c1.ToUInt32();
			uint v2 = c2.ToUInt32();
            return Constant.Bool(v1 <= v2);
		}
开发者ID:relaxar,项目名称:reko,代码行数:8,代码来源:UnsignedIntOperators.cs

示例3: SetRegister

 public override void SetRegister(RegisterStorage reg, Constant c)
 {
     if (c == null || !c.IsValid)
     {
         valid[reg.Number] = false;
     }
     else
     {
         reg.SetRegisterFileValues(regs, c.ToUInt32(), valid);	//$REVIEW: AsUint64 for PPC-64?
     }
 }
开发者ID:killbug2004,项目名称:reko,代码行数:11,代码来源:PowerPcState.cs

示例4: ApplyConstants

		public override Constant ApplyConstants(Constant c1, Constant c2)
		{
			try
			{
				return BuildConstant(c1.DataType, c2.DataType, unchecked((int) (c1.ToUInt32() * c2.ToUInt32())));
			}
			catch	//$HACK: sometimes we get -ive numbers here, at which point .NET casts fail; attempt to use signed integers instead.
			{
				return BuildConstant(c1.DataType, c2.DataType, c1.ToInt32() * c1.ToInt32());
			}
		}
开发者ID:killbug2004,项目名称:reko,代码行数:11,代码来源:UMulOperator.cs

示例5: SetRegister

 public override void SetRegister(RegisterStorage r, Constant v)
 {
     if (v.IsValid)
     {
         isValid |= 1u << r.Number;
         regData[r.Number] = v.ToUInt32();
     }
     else
     {
         isValid &= ~(1u << r.Number);
         regData[r.Number] = 0xCCCCCCCC;
     }
 }
开发者ID:relaxar,项目名称:reko,代码行数:13,代码来源:ArmProcessorState.cs

示例6: SetRegister

 public override void SetRegister(RegisterStorage r, Constant v)
 {
     int rn = r.Number;
     if (0 <= rn && rn < 32)
     {
         // Integer register.
         if (v.IsValid)
         {
             iregs[rn] = v.ToUInt32();
             valid[rn] = true;
             return;
         }
         else
         {
             valid[rn] = false;
         }
     }
 }
开发者ID:relaxar,项目名称:reko,代码行数:18,代码来源:MipsProcessorState.cs

示例7: MakeAddressFromConstant

 public override Address MakeAddressFromConstant(Constant c)
 {
     return Address.Ptr32(c.ToUInt32());
 }
开发者ID:relaxar,项目名称:reko,代码行数:4,代码来源:SparcArchitecture.cs

示例8: ApplyConstants

		public override Constant ApplyConstants(Constant c1, Constant c2)
		{
			return BuildConstant(c1.DataType, c2.DataType, (int) (c1.ToUInt32() >> c2.ToInt32()));
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:4,代码来源:ShrOperator.cs

示例9: ApplyConstants

		public override Constant ApplyConstants(Constant c1, Constant c2)
		{
			uint v1 = (uint) c1.ToUInt32();
			uint v2 = (uint) c2.ToUInt32();
			return Constant.Bool(v1 >= v2);
		}
开发者ID:killbug2004,项目名称:reko,代码行数:6,代码来源:UnsignedIntOperators.cs

示例10: GetSliceImpl

 protected override Expression GetSliceImpl(Constant c)
 {
     return Constant.Word32(c.ToUInt32());
 }
开发者ID:killbug2004,项目名称:reko,代码行数:4,代码来源:IntelRegister.cs

示例11: MakeSegmentedAddress

 public override Address MakeSegmentedAddress(Constant seg, Constant offset)
 {
     return mode.CreateSegmentedAddress(seg.ToUInt16(), offset.ToUInt32());
 }
开发者ID:uxmal,项目名称:reko,代码行数:4,代码来源:X86ProcessorArchitecture.cs

示例12: EmitLeImmediate

		public void EmitLeImmediate(Constant c, PrimitiveType dt)
		{
			switch (dt.Size)
			{
			case 1: EmitByte(c.ToInt32()); return;
			case 2: EmitLeUInt16(c.ToInt32()); return;
			case 4: EmitLeUInt32(c.ToUInt32()); return;
			default: throw new NotSupportedException(string.Format("Unsupported type: {0}", dt));
			}
		}
开发者ID:gitter-badger,项目名称:reko,代码行数:10,代码来源:Emitter.cs


注:本文中的Constant.ToUInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。