From 17673b675d07195467b924ab1fb95937a73f94b2 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Fri, 20 Jul 2018 14:56:05 +0200 Subject: [PATCH] add conversion to signed int --- ChocolArm64/Instruction/AInstEmitSimdCvt.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ChocolArm64/Instruction/AInstEmitSimdCvt.cs b/ChocolArm64/Instruction/AInstEmitSimdCvt.cs index 8e749a3fc..9cf5edacd 100644 --- a/ChocolArm64/Instruction/AInstEmitSimdCvt.cs +++ b/ChocolArm64/Instruction/AInstEmitSimdCvt.cs @@ -119,6 +119,15 @@ namespace ChocolArm64.Instruction EmitVectorExtractF(Context, Op.Rd, Index, SizeF); EmitRoundMathCall(Context, MidpointRounding.ToEven); + + if (Op.RegisterSize == ARegisterSize.SIMD64) + { + Context.Emit(OpCodes.Conv_I4); + } + else if (Op.RegisterSize == ARegisterSize.SIMD128) + { + Context.Emit(OpCodes.Conv_I8); + } EmitVectorInsertF(Context, Op.Rd, Index, 0); @@ -127,8 +136,7 @@ namespace ChocolArm64.Instruction if (Op.RegisterSize == ARegisterSize.SIMD64) { EmitVectorZeroUpper(Context, Op.Rd); - } - + } } public static void Fcvtps_Gp(AILEmitterCtx Context) @@ -594,4 +602,4 @@ namespace ChocolArm64.Instruction } } } -} \ No newline at end of file +}