diff --git a/de4dot.blocks/cflow/Int32Value.cs b/de4dot.blocks/cflow/Int32Value.cs index 6e8ba833..b29c7484 100644 --- a/de4dot.blocks/cflow/Int32Value.cs +++ b/de4dot.blocks/cflow/Int32Value.cs @@ -450,8 +450,6 @@ public static Int32Value Shl(Int32Value a, Int32Value b) { 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(a.Value << shift, validMask); @@ -462,8 +460,6 @@ public static Int32Value Shr(Int32Value a, Int32Value b) { 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)) @@ -476,8 +472,6 @@ public static Int32Value Shr_Un(Int32Value a, Int32Value b) { 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); diff --git a/de4dot.blocks/cflow/Int64Value.cs b/de4dot.blocks/cflow/Int64Value.cs index bc8b3f08..58a443ac 100644 --- a/de4dot.blocks/cflow/Int64Value.cs +++ b/de4dot.blocks/cflow/Int64Value.cs @@ -393,8 +393,6 @@ public static Int64Value Shl(Int64Value a, Int32Value b) { 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) | (ulong.MaxValue >> (sizeof(long) * 8 - shift)); return new Int64Value(a.Value << shift, validMask); @@ -405,8 +403,6 @@ public static Int64Value Shr(Int64Value a, Int32Value b) { 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)) @@ -419,8 +415,6 @@ public static Int64Value Shr_Un(Int64Value a, Int32Value b) { 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) | (ulong.MaxValue << (sizeof(long) * 8 - shift)); return new Int64Value((long)((ulong)a.Value >> shift), validMask);