Add Fcvtas_S/V & Fcvtau_S/V. (#1018)
This commit is contained in:
parent
d0960e75aa
commit
1de16f7653
4 changed files with 61 additions and 25 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue