From bf322c8916b094f8cb00420da3a1c3b62c23a113 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 21 Feb 2019 21:52:35 -0300 Subject: [PATCH] Add missing cast --- ChocolArm64/Instructions/InstEmitMemoryHelper.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ChocolArm64/Instructions/InstEmitMemoryHelper.cs b/ChocolArm64/Instructions/InstEmitMemoryHelper.cs index 7ee5bf5f5a..9625f2a9c4 100644 --- a/ChocolArm64/Instructions/InstEmitMemoryHelper.cs +++ b/ChocolArm64/Instructions/InstEmitMemoryHelper.cs @@ -283,9 +283,18 @@ namespace ChocolArm64.Instructions switch (size) { - case 2: context.EmitCall(typeof(Sse), nameof(Sse.StoreScalar)); break; - case 3: context.EmitCall(typeof(Sse2), nameof(Sse2.StoreScalar)); break; - case 4: context.EmitCall(typeof(Sse), nameof(Sse.StoreAligned)); break; + case 2: context.EmitCall(typeof(Sse), nameof(Sse.StoreScalar)); break; + + case 3: + { + VectorHelper.EmitCall(context, nameof(VectorHelper.VectorSingleToDouble)); + + context.EmitCall(typeof(Sse2), nameof(Sse2.StoreScalar)); + + break; + } + + case 4: context.EmitCall(typeof(Sse), nameof(Sse.StoreAligned)); break; default: throw new InvalidOperationException($"Invalid vector store size of {1 << size} bytes."); }