Add fixed-point variant of the UCVTF instruction
This commit is contained in:
parent
f8a9faa1b9
commit
9432bf0411
2 changed files with 22 additions and 3 deletions
|
@ -349,6 +349,26 @@ namespace ChocolArm64.Instructions
|
|||
EmitScalarSetF(context, op.Rd, op.Size);
|
||||
}
|
||||
|
||||
public static void Ucvtf_Gp_Fixed(ILEmitterCtx context)
|
||||
{
|
||||
OpCodeSimdCvt64 op = (OpCodeSimdCvt64)context.CurrOp;
|
||||
|
||||
context.EmitLdintzr(op.Rn);
|
||||
|
||||
if (context.CurrOp.RegisterSize == RegisterSize.Int32)
|
||||
{
|
||||
context.Emit(OpCodes.Conv_U4);
|
||||
}
|
||||
|
||||
context.Emit(OpCodes.Conv_R_Un);
|
||||
|
||||
EmitFloatCast(context, op.Size);
|
||||
|
||||
EmitI2fFBitsMul(context, op.Size, op.FBits);
|
||||
|
||||
EmitScalarSetF(context, op.Rd, op.Size);
|
||||
}
|
||||
|
||||
public static void Ucvtf_S(ILEmitterCtx context)
|
||||
{
|
||||
OpCodeSimd64 op = (OpCodeSimd64)context.CurrOp;
|
||||
|
@ -530,9 +550,7 @@ namespace ChocolArm64.Instructions
|
|||
context.Emit(OpCodes.Conv_R_Un);
|
||||
}
|
||||
|
||||
context.Emit(sizeF == 0
|
||||
? OpCodes.Conv_R4
|
||||
: OpCodes.Conv_R8);
|
||||
EmitFloatCast(context, sizeF);
|
||||
|
||||
EmitI2fFBitsMul(context, sizeF, fBits);
|
||||
|
||||
|
|
|
@ -542,6 +542,7 @@ namespace ChocolArm64
|
|||
SetA64("01101110<<110000001110xxxxxxxxxx", InstEmit.Uaddlv_V, typeof(OpCodeSimd64));
|
||||
SetA64("0x101110<<1xxxxx000100xxxxxxxxxx", InstEmit.Uaddw_V, typeof(OpCodeSimdReg64));
|
||||
SetA64("x00111100x100011000000xxxxxxxxxx", InstEmit.Ucvtf_Gp, typeof(OpCodeSimdCvt64));
|
||||
SetA64("x00111100x000011xxxxxxxxxxxxxxxx", InstEmit.Ucvtf_Gp_Fixed, typeof(OpCodeSimdCvt64));
|
||||
SetA64("011111100x100001110110xxxxxxxxxx", InstEmit.Ucvtf_S, typeof(OpCodeSimd64));
|
||||
SetA64("0>1011100<100001110110xxxxxxxxxx", InstEmit.Ucvtf_V, typeof(OpCodeSimd64));
|
||||
SetA64("0x101110<<1xxxxx000001xxxxxxxxxx", InstEmit.Uhadd_V, typeof(OpCodeSimdReg64));
|
||||
|
|
Loading…
Add table
Reference in a new issue