diff --git a/ChocolArm64/Instructions/CryptoHelper.cs b/ChocolArm64/Instructions/CryptoHelper.cs index d0aabcf1e3..030fd97ea0 100644 --- a/ChocolArm64/Instructions/CryptoHelper.cs +++ b/ChocolArm64/Instructions/CryptoHelper.cs @@ -311,15 +311,20 @@ namespace ChocolArm64.Instructions fixed (byte* ptr = &state[0]) { - Sse2.Store(ptr, Sse.StaticCast(op)); + Sse2.Store(ptr, op.As()); } } private unsafe static void FromByteArrayToVector(byte[] state, ref Vector128 op) { + if (!Sse2.IsSupported) + { + throw new PlatformNotSupportedException(); + } + fixed (byte* ptr = &state[0]) { - op = Sse.StaticCast(Sse2.LoadVector128(ptr)); + op = Sse2.LoadVector128(ptr).As(); } } }