Update InstEmitSimdArithmetic.cs
This commit is contained in:
parent
fc5b59dc1c
commit
33b4af6a59
1 changed files with 28 additions and 1 deletions
|
@ -1637,9 +1637,36 @@ namespace ChocolArm64.Instructions
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Neg_V(ILEmitterCtx context)
|
public static void Neg_V(ILEmitterCtx context)
|
||||||
|
{
|
||||||
|
if (Optimizations.UseSse2)
|
||||||
|
{
|
||||||
|
OpCodeSimd64 op = (OpCodeSimd64)context.CurrOp;
|
||||||
|
|
||||||
|
Type[] typesSub = new Type[] { VectorIntTypesPerSizeLog2[op.Size], VectorIntTypesPerSizeLog2[op.Size] };
|
||||||
|
|
||||||
|
string[] namesSzv = new string[] { nameof(VectorHelper.VectorSByteZero),
|
||||||
|
nameof(VectorHelper.VectorInt16Zero),
|
||||||
|
nameof(VectorHelper.VectorInt32Zero),
|
||||||
|
nameof(VectorHelper.VectorInt64Zero) };
|
||||||
|
|
||||||
|
VectorHelper.EmitCall(context, namesSzv[op.Size]);
|
||||||
|
|
||||||
|
EmitLdvecWithSignedCast(context, op.Rn, op.Size);
|
||||||
|
|
||||||
|
context.EmitCall(typeof(Sse2).GetMethod(nameof(Sse2.Subtract), typesSub));
|
||||||
|
|
||||||
|
EmitStvecWithSignedCast(context, op.Rd, op.Size);
|
||||||
|
|
||||||
|
if (op.RegisterSize == RegisterSize.Simd64)
|
||||||
|
{
|
||||||
|
EmitVectorZeroUpper(context, op.Rd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
EmitVectorUnaryOpSx(context, () => context.Emit(OpCodes.Neg));
|
EmitVectorUnaryOpSx(context, () => context.Emit(OpCodes.Neg));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void Raddhn_V(ILEmitterCtx context)
|
public static void Raddhn_V(ILEmitterCtx context)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue