fix 'unary', newline

This commit is contained in:
MS-DOS1999 2018-07-20 03:18:36 +02:00
parent a6c72f4583
commit 29298192ec

View file

@ -792,19 +792,19 @@ namespace ChocolArm64.Instruction
Narrow = 1 << 3, Narrow = 1 << 3,
Binary = 1 << 4, Binary = 1 << 4,
SxSxScalar = SignedSrc | SignedDst | Scalar, SxSxScalarUnary = SignedSrc | SignedDst | Scalar,
SxSxScalarNarrow = SignedSrc | SignedDst | Scalar | Narrow, SxSxScalarNarrowUnary = SignedSrc | SignedDst | Scalar | Narrow,
SxZxScalar = SignedSrc | Scalar, SxZxScalarUnary = SignedSrc | Scalar,
SxZxScalarNarrow = SignedSrc | Scalar | Narrow, SxZxScalarNarrowUnary = SignedSrc | Scalar | Narrow,
ZxZxScalar = Scalar, ZxZxScalarUnary = Scalar,
ZxZxScalarNarrow = Scalar | Narrow, ZxZxScalarNarrowUnary = Scalar | Narrow,
SxSxVector = SignedSrc | SignedDst, SxSxVectorUnary = SignedSrc | SignedDst,
SxSxVectorNarrow = SignedSrc | SignedDst | Narrow, SxSxVectorNarrowUnary = SignedSrc | SignedDst | Narrow,
SxZxVector = SignedSrc, SxZxVectorUnary = SignedSrc,
SxZxVectorNarrow = SignedSrc | Narrow, SxZxVectorNarrowUnary = SignedSrc | Narrow,
ZxZxVector = 0, ZxZxVectorUnary = 0,
ZxZxVectorNarrow = Narrow, ZxZxVectorNarrowUnary = Narrow,
SxSxScalarBinary = SignedSrc | SignedDst | Scalar | Binary, SxSxScalarBinary = SignedSrc | SignedDst | Scalar | Binary,
SxSxScalarNarrowBinary = SignedSrc | SignedDst | Scalar | Narrow | Binary, SxSxScalarNarrowBinary = SignedSrc | SignedDst | Scalar | Narrow | Binary,
@ -843,32 +843,32 @@ namespace ChocolArm64.Instruction
public static void EmitScalarUnarySaturatingNarrowOpSxSx(AILEmitterCtx Context, Action Emit) public static void EmitScalarUnarySaturatingNarrowOpSxSx(AILEmitterCtx Context, Action Emit)
{ {
EmitSaturatingOp(Context, Emit, SaturatingFlags.SxSxScalarNarrow); EmitSaturatingOp(Context, Emit, SaturatingFlags.SxSxScalarNarrowUnary);
} }
public static void EmitScalarUnarySaturatingNarrowOpSxZx(AILEmitterCtx Context, Action Emit) public static void EmitScalarUnarySaturatingNarrowOpSxZx(AILEmitterCtx Context, Action Emit)
{ {
EmitSaturatingOp(Context, Emit, SaturatingFlags.SxZxScalarNarrow); EmitSaturatingOp(Context, Emit, SaturatingFlags.SxZxScalarNarrowUnary);
} }
public static void EmitScalarUnarySaturatingNarrowOpZxZx(AILEmitterCtx Context, Action Emit) public static void EmitScalarUnarySaturatingNarrowOpZxZx(AILEmitterCtx Context, Action Emit)
{ {
EmitSaturatingOp(Context, Emit, SaturatingFlags.ZxZxScalarNarrow); EmitSaturatingOp(Context, Emit, SaturatingFlags.ZxZxScalarNarrowUnary);
} }
public static void EmitVectorUnarySaturatingNarrowOpSxSx(AILEmitterCtx Context, Action Emit) public static void EmitVectorUnarySaturatingNarrowOpSxSx(AILEmitterCtx Context, Action Emit)
{ {
EmitSaturatingOp(Context, Emit, SaturatingFlags.SxSxVectorNarrow); EmitSaturatingOp(Context, Emit, SaturatingFlags.SxSxVectorNarrowUnary);
} }
public static void EmitVectorUnarySaturatingNarrowOpSxZx(AILEmitterCtx Context, Action Emit) public static void EmitVectorUnarySaturatingNarrowOpSxZx(AILEmitterCtx Context, Action Emit)
{ {
EmitSaturatingOp(Context, Emit, SaturatingFlags.SxZxVectorNarrow); EmitSaturatingOp(Context, Emit, SaturatingFlags.SxZxVectorNarrowUnary);
} }
public static void EmitVectorUnarySaturatingNarrowOpZxZx(AILEmitterCtx Context, Action Emit) public static void EmitVectorUnarySaturatingNarrowOpZxZx(AILEmitterCtx Context, Action Emit)
{ {
EmitSaturatingOp(Context, Emit, SaturatingFlags.ZxZxVectorNarrow); EmitSaturatingOp(Context, Emit, SaturatingFlags.ZxZxVectorNarrowUnary);
} }
public static void EmitSaturatingOp( public static void EmitSaturatingOp(
@ -889,6 +889,7 @@ namespace ChocolArm64.Instruction
int ESize = 8 << Op.Size; int ESize = 8 << Op.Size;
int Part = 0; int Part = 0;
if (Narrow) if (Narrow)
{ {
Part = !Scalar && (Op.RegisterSize == ARegisterSize.SIMD128) ? Elems : 0; Part = !Scalar && (Op.RegisterSize == ARegisterSize.SIMD128) ? Elems : 0;
@ -912,6 +913,7 @@ namespace ChocolArm64.Instruction
AILLabel LblGeEnd = new AILLabel(); AILLabel LblGeEnd = new AILLabel();
EmitVectorExtract(Context, Op.Rn, Index, Op.Size + 1, SignedSrc); EmitVectorExtract(Context, Op.Rn, Index, Op.Size + 1, SignedSrc);
if (Binary) if (Binary)
{ {
EmitVectorExtract(Context, ((AOpCodeSimdReg)Op).Rm, Index, Op.Size + 1, SignedSrc); EmitVectorExtract(Context, ((AOpCodeSimdReg)Op).Rm, Index, Op.Size + 1, SignedSrc);