mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-09 12:19:12 +00:00
Implement Sqrshrn_S & Sqrshrun_V & Sqrshrun_S
This commit is contained in:
parent
5d698a7d8d
commit
4997fb6135
2 changed files with 70 additions and 0 deletions
|
@ -373,7 +373,10 @@ namespace ChocolArm64
|
||||||
SetA64("0x001110<<1xxxxx100000xxxxxxxxxx", AInstEmit.Smlal_V, typeof(AOpCodeSimdReg));
|
SetA64("0x001110<<1xxxxx100000xxxxxxxxxx", AInstEmit.Smlal_V, typeof(AOpCodeSimdReg));
|
||||||
SetA64("0x001110<<1xxxxx101000xxxxxxxxxx", AInstEmit.Smlsl_V, typeof(AOpCodeSimdReg));
|
SetA64("0x001110<<1xxxxx101000xxxxxxxxxx", AInstEmit.Smlsl_V, typeof(AOpCodeSimdReg));
|
||||||
SetA64("0x001110<<1xxxxx110000xxxxxxxxxx", AInstEmit.Smull_V, typeof(AOpCodeSimdReg));
|
SetA64("0x001110<<1xxxxx110000xxxxxxxxxx", AInstEmit.Smull_V, typeof(AOpCodeSimdReg));
|
||||||
|
SetA64("0101111100>>>xxx100111xxxxxxxxxx", AInstEmit.Sqrshrn_S, typeof(AOpCodeSimdShImm));
|
||||||
SetA64("0x00111100>>>xxx100111xxxxxxxxxx", AInstEmit.Sqrshrn_V, typeof(AOpCodeSimdShImm));
|
SetA64("0x00111100>>>xxx100111xxxxxxxxxx", AInstEmit.Sqrshrn_V, typeof(AOpCodeSimdShImm));
|
||||||
|
SetA64("0111111100>>>xxx100011xxxxxxxxxx", AInstEmit.Sqrshrun_S, typeof(AOpCodeSimdShImm));
|
||||||
|
SetA64("0x10111100>>>xxx100011xxxxxxxxxx", AInstEmit.Sqrshrun_V, typeof(AOpCodeSimdShImm));
|
||||||
SetA64("01011110<<100001010010xxxxxxxxxx", AInstEmit.Sqxtn_S, typeof(AOpCodeSimd));
|
SetA64("01011110<<100001010010xxxxxxxxxx", AInstEmit.Sqxtn_S, typeof(AOpCodeSimd));
|
||||||
SetA64("0x001110<<100001010010xxxxxxxxxx", AInstEmit.Sqxtn_V, typeof(AOpCodeSimd));
|
SetA64("0x001110<<100001010010xxxxxxxxxx", AInstEmit.Sqxtn_V, typeof(AOpCodeSimd));
|
||||||
SetA64("01111110<<100001001010xxxxxxxxxx", AInstEmit.Sqxtun_S, typeof(AOpCodeSimd));
|
SetA64("01111110<<100001001010xxxxxxxxxx", AInstEmit.Sqxtun_S, typeof(AOpCodeSimd));
|
||||||
|
|
|
@ -81,6 +81,29 @@ namespace ChocolArm64.Instruction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Sqrshrn_S(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
||||||
|
|
||||||
|
int Shift = GetImmShr(Op);
|
||||||
|
|
||||||
|
long RoundConst = 1L << (Shift - 1);
|
||||||
|
|
||||||
|
Action Emit = () =>
|
||||||
|
{
|
||||||
|
Context.EmitLdc_I8(RoundConst);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Add);
|
||||||
|
|
||||||
|
Context.EmitLdc_I4(Shift);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Shr);
|
||||||
|
};
|
||||||
|
|
||||||
|
EmitScalarSaturatingNarrowOpSxSx(Context, Emit);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static void Sqrshrn_V(AILEmitterCtx Context)
|
public static void Sqrshrn_V(AILEmitterCtx Context)
|
||||||
{
|
{
|
||||||
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
||||||
|
@ -103,6 +126,50 @@ namespace ChocolArm64.Instruction
|
||||||
EmitVectorSaturatingNarrowOpSxSx(Context, Emit);
|
EmitVectorSaturatingNarrowOpSxSx(Context, Emit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Sqrshrun_S(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
||||||
|
|
||||||
|
int Shift = GetImmShr(Op);
|
||||||
|
|
||||||
|
long RoundConst = 1L << (Shift - 1);
|
||||||
|
|
||||||
|
Action Emit = () =>
|
||||||
|
{
|
||||||
|
Context.EmitLdc_I8(RoundConst);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Add);
|
||||||
|
|
||||||
|
Context.EmitLdc_I4(Shift);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Shr);
|
||||||
|
};
|
||||||
|
|
||||||
|
EmitScalarSaturatingNarrowOpZxZx(Context, Emit);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Sqrshrun_V(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
||||||
|
|
||||||
|
int Shift = GetImmShr(Op);
|
||||||
|
|
||||||
|
long RoundConst = 1L << (Shift - 1);
|
||||||
|
|
||||||
|
Action Emit = () =>
|
||||||
|
{
|
||||||
|
Context.EmitLdc_I8(RoundConst);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Add);
|
||||||
|
|
||||||
|
Context.EmitLdc_I4(Shift);
|
||||||
|
|
||||||
|
Context.Emit(OpCodes.Shr);
|
||||||
|
};
|
||||||
|
|
||||||
|
EmitVectorSaturatingNarrowOpZxZx(Context, Emit);
|
||||||
|
}
|
||||||
|
|
||||||
public static void Srshr_V(AILEmitterCtx Context)
|
public static void Srshr_V(AILEmitterCtx Context)
|
||||||
{
|
{
|
||||||
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
AOpCodeSimdShImm Op = (AOpCodeSimdShImm)Context.CurrOp;
|
||||||
|
|
Loading…
Reference in a new issue