diff options
author | LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> | 2020-03-24 22:53:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-24 22:53:49 +0100 |
commit | 1de16f7653b1c5ef1c780fe8840c9c5819c08a3d (patch) | |
tree | 670d15eb9fb2ed5a6d01b19fa6a97b9c8d509b2e /ARMeilleure/Instructions/InstEmitSimdCvt.cs | |
parent | d0960e75aaa597f82905a64362bc8e104dc09bc3 (diff) |
Add Fcvtas_S/V & Fcvtau_S/V. (#1018)
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdCvt.cs')
-rw-r--r-- | ARMeilleure/Instructions/InstEmitSimdCvt.cs | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdCvt.cs b/ARMeilleure/Instructions/InstEmitSimdCvt.cs index a790e5bb..49f0365b 100644 --- a/ARMeilleure/Instructions/InstEmitSimdCvt.cs +++ b/ARMeilleure/Instructions/InstEmitSimdCvt.cs @@ -98,11 +98,31 @@ namespace ARMeilleure.Instructions EmitFcvt_s_Gp(context, (op1) => EmitRoundMathCall(context, MidpointRounding.AwayFromZero, op1)); } + public static void Fcvtas_S(ArmEmitterContext context) + { + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.AwayFromZero, op1), signed: true, scalar: true); + } + + public static void Fcvtas_V(ArmEmitterContext context) + { + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.AwayFromZero, op1), signed: true, scalar: false); + } + public static void Fcvtau_Gp(ArmEmitterContext context) { EmitFcvt_u_Gp(context, (op1) => EmitRoundMathCall(context, MidpointRounding.AwayFromZero, op1)); } + public static void Fcvtau_S(ArmEmitterContext context) + { + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.AwayFromZero, op1), signed: false, scalar: true); + } + + public static void Fcvtau_V(ArmEmitterContext context) + { + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.AwayFromZero, op1), signed: false, scalar: false); + } + public static void Fcvtl_V(ArmEmitterContext context) { OpCodeSimd op = (OpCodeSimd)context.CurrOp; @@ -255,7 +275,7 @@ namespace ARMeilleure.Instructions } else { - EmitFcvtn(context, signed: true, scalar: true); + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.ToEven, op1), signed: true, scalar: true); } } @@ -267,7 +287,7 @@ namespace ARMeilleure.Instructions } else { - EmitFcvtn(context, signed: true, scalar: false); + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.ToEven, op1), signed: true, scalar: false); } } @@ -279,7 +299,7 @@ namespace ARMeilleure.Instructions } else { - EmitFcvtn(context, signed: false, scalar: true); + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.ToEven, op1), signed: false, scalar: true); } } @@ -291,7 +311,7 @@ namespace ARMeilleure.Instructions } else { - EmitFcvtn(context, signed: false, scalar: false); + EmitFcvt(context, (op1) => EmitRoundMathCall(context, MidpointRounding.ToEven, op1), signed: false, scalar: false); } } @@ -585,7 +605,7 @@ namespace ARMeilleure.Instructions } } - private static void EmitFcvtn(ArmEmitterContext context, bool signed, bool scalar) + private static void EmitFcvt(ArmEmitterContext context, Func1I emit, bool signed, bool scalar) { OpCodeSimd op = (OpCodeSimd)context.CurrOp; @@ -604,7 +624,7 @@ namespace ARMeilleure.Instructions { Operand ne = context.VectorExtract(type, n, index); - Operand e = EmitRoundMathCall(context, MidpointRounding.ToEven, ne); + Operand e = emit(ne); if (sizeF == 0) { |