• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# cflow.Int32Value类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中de4dot.blocks.cflow.Int32Value的典型用法代码示例。如果您正苦于以下问题:C# Int32Value类的具体用法?C# Int32Value怎么用?C# Int32Value使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Int32Value类属于de4dot.blocks.cflow命名空间,在下文中一共展示了Int32Value类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Add

 public static Int32Value Add(Int32Value a, Int32Value b)
 {
     if (a.allBitsValid() && b.allBitsValid())
         return new Int32Value(a.value + b.value);
     if (ReferenceEquals(a, b))
         return new Int32Value(a.value << 1, (a.validMask << 1) | 1);
     return createUnknown();
 }
开发者ID:n017,项目名称:NETDeob,代码行数:8,代码来源:Int32Value.cs


示例2:

		bool IBranchHandler.HandleSwitch(Int32Value switchIndex) {
			var target = CflowUtils.GetSwitchTarget(block.Targets, block.FallThrough, switchIndex);
			if (target == null)
				return false;

			PopPushedArgs(1);
			block.ReplaceSwitchWithBranch(target);
			return true;
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:9,代码来源:BlockCflowDeobfuscator.cs


示例3: GetSwitchTarget

		public static Block GetSwitchTarget(IList<Block> targets, Block fallThrough, Int32Value intValue) {
			if (!intValue.AllBitsValid())
				return null;

			int index = intValue.Value;
			if (targets == null || index < 0 || index >= targets.Count)
				return fallThrough;
			else
				return targets[index];
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:10,代码来源:CflowUtils.cs


示例4:

		bool IBranchHandler.HandleSwitch(Int32Value switchIndex) {
			if (!switchIndex.AllBitsValid())
				return false;
			var instr = instructions[emulateIndex];
			var targets = (Instruction[])instr.Operand;
			if (switchIndex.Value >= 0 && switchIndex.Value < targets.Length)
				emulateIndex = instructions.IndexOf(targets[switchIndex.Value]);
			else
				emulateIndex++;
			return true;
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:11,代码来源:BabelMethodCallInliner.cs


示例5: Add_Ovf

 public static Int32Value Add_Ovf(Int32Value a, Int32Value b)
 {
     if (a.AllBitsValid() && b.AllBitsValid()) {
         try {
             return new Int32Value(checked(a.Value + b.Value));
         }
         catch (OverflowException) {
         }
     }
     return CreateUnknown();
 }
开发者ID:kakkerlakgly,项目名称:de4dot,代码行数:11,代码来源:Int32Value.cs


示例6: Add_Ovf_Un

 public static Int32Value Add_Ovf_Un(Int32Value a, Int32Value b)
 {
     if (a.AllBitsValid() && b.AllBitsValid()) {
         uint aa = (uint)a.Value, bb = (uint)b.Value;
         try {
             return new Int32Value((int)checked(aa + bb));
         }
         catch (OverflowException) {
         }
     }
     return CreateUnknown();
 }
开发者ID:kakkerlakgly,项目名称:de4dot,代码行数:12,代码来源:Int32Value.cs


示例7: CompareLt_Un

		public static Bool3 CompareLt_Un(Int32Value a, Int32Value b) {
			if (a.AllBitsValid() && b.AllBitsValid())
				return (uint)a.Value < (uint)b.Value ? Bool3.True : Bool3.False;
			if (a.HasValue(uint.MaxValue))
				return Bool3.False;	// max < x => false
			if (b.HasValue(uint.MinValue))
				return Bool3.False;	// x < min => false
			return Bool3.Unknown;
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:9,代码来源:Int32Value.cs


示例8: CompareGe

		public static Bool3 CompareGe(Int32Value a, Int32Value b) {
			if (a.AllBitsValid() && b.AllBitsValid())
				return a.Value >= b.Value ? Bool3.True : Bool3.False;
			if (a.HasValue(int.MaxValue))
				return Bool3.True;	// max >= x => true
			if (b.HasValue(int.MinValue))
				return Bool3.True;	// x >= min => true
			return Bool3.Unknown;
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:9,代码来源:Int32Value.cs


示例9: CompareNeq

		public static Bool3 CompareNeq(Int32Value a, Int32Value b) {
			if (a.AllBitsValid() && b.AllBitsValid())
				return a.Value != b.Value ? Bool3.True : Bool3.False;
			if (ReferenceEquals(a, b))
				return Bool3.False;
			if (((uint)a.Value & a.ValidMask & b.ValidMask) != ((uint)b.Value & a.ValidMask & b.ValidMask))
				return Bool3.True;
			return Bool3.Unknown;
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:9,代码来源:Int32Value.cs


示例10: Cgt

		public static Int32Value Cgt(Int32Value a, Int32Value b) {
			return Create(CompareGt(a, b));
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:3,代码来源:Int32Value.cs


示例11: 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);
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:11,代码来源:Int32Value.cs


示例12: Not

		public static Int32Value Not(Int32Value a) {
			return new Int32Value(~a.Value, a.ValidMask);
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:3,代码来源:Int32Value.cs


示例13: Conv_Ovf_U8

		public static Int64Value Conv_Ovf_U8(Int32Value a) {
			if (!IsBitValid(a.ValidMask, 31) || a.Value < 0)
				return Int64Value.CreateUnknown();
			return new Int64Value(a.Value, (ulong)a.ValidMask | (Int64Value.NO_UNKNOWN_BITS << 32));
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:5,代码来源:Int32Value.cs


示例14: Conv_Ovf_U4_Un

		public static Int32Value Conv_Ovf_U4_Un(Int32Value a) {
			return a;
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:3,代码来源:Int32Value.cs


示例15: Conv_Ovf_U4

		public static Int32Value Conv_Ovf_U4(Int32Value a) {
			if (!IsBitValid(a.ValidMask, 31) || a.Value < 0)
				return CreateUnknown();
			return a;
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:5,代码来源:Int32Value.cs


示例16: Or

		public static Int32Value Or(Int32Value a, Int32Value b) {
			int av = a.Value, bv = b.Value;
			uint am = a.ValidMask, bm = b.ValidMask;
			return new Int32Value(av | bv, (am & bm) | ((uint)av & am) | ((uint)bv & bm));
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:5,代码来源:Int32Value.cs


示例17: Xor

		public static Int32Value Xor(Int32Value a, Int32Value b) {
			if (ReferenceEquals(a, b))
				return Zero;
			int av = a.Value, bv = b.Value;
			uint am = a.ValidMask, bm = b.ValidMask;
			return new Int32Value(av ^ bv, am & bm);
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:7,代码来源:Int32Value.cs


示例18: Conv_Ovf_U8_Un

		public static Int64Value Conv_Ovf_U8_Un(Int32Value a) {
			return new Int64Value((long)(uint)a.Value, a.ValidMask | (Int64Value.NO_UNKNOWN_BITS << 32));
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:3,代码来源:Int32Value.cs


示例19: 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);
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:13,代码来源:Int32Value.cs


示例20: Conv_R8

		public static Real8Value Conv_R8(Int32Value a) {
			if (a.AllBitsValid())
				return new Real8Value((double)(int)a.Value);
			return Real8Value.CreateUnknown();
		}
开发者ID:RafaelRMachado,项目名称:de4dot,代码行数:5,代码来源:Int32Value.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# cflow.Int64Value类代码示例发布时间:2022-05-26
下一篇:
C# blocks.Blocks类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap