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;
|
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;
|
||||||
|
|
||||||
int SizeF = Op.Size & 1;
|
|
||||||
|
|
||||||
int Bytes = Context.CurrOp.GetBitsCount() >> 3;
|
int Bytes = Context.CurrOp.GetBitsCount() >> 3;
|
||||||
|
|
||||||
int Elems = Bytes >> SizeF + 2;
|
int Elems = Bytes >> Op.Size;
|
||||||
int Half = Elems >> 1;
|
int Half = Elems >> 1;
|
||||||
|
|
||||||
for (int Index = 0; Index < Elems; Index++)
|
for (int Index = 0; Index < Elems; Index++)
|
||||||
{
|
{
|
||||||
int Elem = (Index & (Half - 1)) << 1;
|
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 + 0, Op.Size);
|
||||||
EmitVectorExtractF(Context, Index < Half ? Op.Rn : Op.Rm, Elem + 1, SizeF);
|
EmitVectorExtractF(Context, Index < Half ? Op.Rn : Op.Rm, Elem + 1, Op.Size);
|
||||||
|
|
||||||
Context.Emit(OpCodes.Add);
|
Context.Emit(OpCodes.Add);
|
||||||
|
|
||||||
EmitVectorInsertTmpF(Context, Index, SizeF);
|
EmitVectorInsertTmpF(Context, Index, Op.Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
Context.EmitLdvectmp();
|
Context.EmitLdvectmp();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue