add conversion to signed int

This commit is contained in:
greggameplayer 2018-07-20 14:56:05 +02:00 committed by GitHub
parent e502650787
commit 17673b675d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,6 +119,15 @@ namespace ChocolArm64.Instruction
EmitVectorExtractF(Context, Op.Rd, Index, SizeF); EmitVectorExtractF(Context, Op.Rd, Index, SizeF);
EmitRoundMathCall(Context, MidpointRounding.ToEven); 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); EmitVectorInsertF(Context, Op.Rd, Index, 0);
@ -127,8 +136,7 @@ namespace ChocolArm64.Instruction
if (Op.RegisterSize == ARegisterSize.SIMD64) if (Op.RegisterSize == ARegisterSize.SIMD64)
{ {
EmitVectorZeroUpper(Context, Op.Rd); EmitVectorZeroUpper(Context, Op.Rd);
} }
} }
public static void Fcvtps_Gp(AILEmitterCtx Context) public static void Fcvtps_Gp(AILEmitterCtx Context)
@ -594,4 +602,4 @@ namespace ChocolArm64.Instruction
} }
} }
} }
} }