aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoder/AOpCodeSimdImm.cs
diff options
context:
space:
mode:
Diffstat (limited to 'ChocolArm64/Decoder/AOpCodeSimdImm.cs')
-rw-r--r--ChocolArm64/Decoder/AOpCodeSimdImm.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/ChocolArm64/Decoder/AOpCodeSimdImm.cs b/ChocolArm64/Decoder/AOpCodeSimdImm.cs
index 2959aee6..e7dfe621 100644
--- a/ChocolArm64/Decoder/AOpCodeSimdImm.cs
+++ b/ChocolArm64/Decoder/AOpCodeSimdImm.cs
@@ -88,7 +88,14 @@ namespace ChocolArm64.Decoder
private static long ShlOnes(long Value, int Shift)
{
- return Value << Shift | (long)(ulong.MaxValue >> (64 - Shift));
+ if (Shift != 0)
+ {
+ return Value << Shift | (long)(ulong.MaxValue >> (64 - Shift));
+ }
+ else
+ {
+ return Value;
+ }
}
}
} \ No newline at end of file