From 5cf8f606e2f94aeb7df1acc91d6ebb0d7c4fdf54 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 15 Jan 2024 16:46:30 +1000 Subject: [PATCH] Push the right fix! --- src/ImageSharp/Common/Helpers/Vector128Utilities.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImageSharp/Common/Helpers/Vector128Utilities.cs b/src/ImageSharp/Common/Helpers/Vector128Utilities.cs index 3ca551494..1290229d9 100644 --- a/src/ImageSharp/Common/Helpers/Vector128Utilities.cs +++ b/src/ImageSharp/Common/Helpers/Vector128Utilities.cs @@ -111,9 +111,7 @@ internal static class Vector128Utilities { if (Sse2.IsSupported) { -#pragma warning disable CA1857 // A constant is expected for the parameter - return Sse2.ShiftRightLogical128BitLane(value, (byte)(16 - numBytes)); -#pragma warning restore CA1857 // A constant is expected for the parameter + return Sse2.ShiftRightLogical128BitLane(value, numBytes); } if (AdvSimd.IsSupported) @@ -141,7 +139,9 @@ internal static class Vector128Utilities if (AdvSimd.IsSupported) { - return AdvSimd.ExtractVector128(Vector128.Zero, value, numBytes); +#pragma warning disable CA1857 // A constant is expected for the parameter + return AdvSimd.ExtractVector128(Vector128.Zero, value, (byte)(16 - numBytes)); +#pragma warning restore CA1857 // A constant is expected for the parameter } ThrowUnreachableException();