Update InstEmitSimdHelper.cs
This commit is contained in:
parent
12badfffb9
commit
0d8c753c3a
1 changed files with 29 additions and 0 deletions
|
@ -821,6 +821,35 @@ namespace ChocolArm64.Instructions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void EmitVectorAcrossVectorOpSx(ILEmitterCtx context, Action emit)
|
||||||
|
{
|
||||||
|
EmitVectorAcrossVectorOp(context, emit, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void EmitVectorAcrossVectorOpZx(ILEmitterCtx context, Action emit)
|
||||||
|
{
|
||||||
|
EmitVectorAcrossVectorOp(context, emit, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void EmitVectorAcrossVectorOp(ILEmitterCtx context, Action emit, bool signed)
|
||||||
|
{
|
||||||
|
OpCodeSimd64 op = (OpCodeSimd64)context.CurrOp;
|
||||||
|
|
||||||
|
int bytes = op.GetBitsCount() >> 3;
|
||||||
|
int elems = bytes >> op.Size;
|
||||||
|
|
||||||
|
EmitVectorExtract(context, op.Rn, 0, op.Size, signed);
|
||||||
|
|
||||||
|
for (int index = 1; index < elems; index++)
|
||||||
|
{
|
||||||
|
EmitVectorExtract(context, op.Rn, index, op.Size, signed);
|
||||||
|
|
||||||
|
emit();
|
||||||
|
}
|
||||||
|
|
||||||
|
EmitScalarSet(context, op.Rd, op.Size);
|
||||||
|
}
|
||||||
|
|
||||||
public static void EmitVectorPairwiseOpF(ILEmitterCtx context, Action emit)
|
public static void EmitVectorPairwiseOpF(ILEmitterCtx context, Action emit)
|
||||||
{
|
{
|
||||||
OpCodeSimdReg64 op = (OpCodeSimdReg64)context.CurrOp;
|
OpCodeSimdReg64 op = (OpCodeSimdReg64)context.CurrOp;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue