Add Faddp (vector) instruction
This commit is contained in:
parent
4c19c908e5
commit
eaca9a3d5d
1 changed files with 4 additions and 6 deletions
|
@ -133,23 +133,21 @@ namespace ChocolArm64.Instruction
|
|||
{
|
||||
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;
|
||||
|
||||
int SizeF = Op.Size & 1;
|
||||
|
||||
int Bytes = Context.CurrOp.GetBitsCount() >> 3;
|
||||
|
||||
int Elems = Bytes >> SizeF + 2;
|
||||
int Elems = Bytes >> Op.Size;
|
||||
int Half = Elems >> 1;
|
||||
|
||||
for (int Index = 0; Index < Elems; Index++)
|
||||
{
|
||||
int Elem = (Index & (Half - 1)) << 1;
|
||||
|
||||
EmitVectorExtractF(Context, Index < Half ? Op.Rn : Op.Rm, Elem + 0, SizeF);
|
||||
EmitVectorExtractF(Context, Index < Half ? Op.Rn : Op.Rm, Elem + 1, SizeF);
|
||||
EmitVectorExtractF(Context, Index < Half ? Op.Rn : Op.Rm, Elem + 0, Op.Size);
|
||||
EmitVectorExtractF(Context, Index < Half ? Op.Rn : Op.Rm, Elem + 1, Op.Size);
|
||||
|
||||
Context.Emit(OpCodes.Add);
|
||||
|
||||
EmitVectorInsertTmpF(Context, Index, SizeF);
|
||||
EmitVectorInsertTmpF(Context, Index, Op.Size);
|
||||
}
|
||||
|
||||
Context.EmitLdvectmp();
|
||||
|
|
Loading…
Add table
Reference in a new issue