Create AInstEmitSimdHash.cs
This commit is contained in:
parent
8c69db43c7
commit
d8c213a2e5
1 changed files with 61 additions and 0 deletions
61
ChocolArm64/Instruction/AInstEmitSimdHash.cs
Normal file
61
ChocolArm64/Instruction/AInstEmitSimdHash.cs
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
using ChocolArm64.Decoder;
|
||||||
|
using ChocolArm64.Translation;
|
||||||
|
|
||||||
|
namespace ChocolArm64.Instruction
|
||||||
|
{
|
||||||
|
static partial class AInstEmit
|
||||||
|
{
|
||||||
|
#region "Sha256"
|
||||||
|
public static void Sha256h_V(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;
|
||||||
|
|
||||||
|
Context.EmitLdvec(Op.Rd);
|
||||||
|
Context.EmitLdvec(Op.Rn);
|
||||||
|
Context.EmitLdvec(Op.Rm);
|
||||||
|
|
||||||
|
ASoftFallback.EmitCall(Context, nameof(ASoftFallback.HashLower));
|
||||||
|
|
||||||
|
Context.EmitStvec(Op.Rd);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Sha256h2_V(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;
|
||||||
|
|
||||||
|
Context.EmitLdvec(Op.Rd);
|
||||||
|
Context.EmitLdvec(Op.Rn);
|
||||||
|
Context.EmitLdvec(Op.Rm);
|
||||||
|
|
||||||
|
ASoftFallback.EmitCall(Context, nameof(ASoftFallback.HashUpper));
|
||||||
|
|
||||||
|
Context.EmitStvec(Op.Rd);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Sha256su0_V(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimd Op = (AOpCodeSimd)Context.CurrOp;
|
||||||
|
|
||||||
|
Context.EmitLdvec(Op.Rd);
|
||||||
|
Context.EmitLdvec(Op.Rn);
|
||||||
|
|
||||||
|
ASoftFallback.EmitCall(Context, nameof(ASoftFallback.SchedulePart1));
|
||||||
|
|
||||||
|
Context.EmitStvec(Op.Rd);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Sha256su1_V(AILEmitterCtx Context)
|
||||||
|
{
|
||||||
|
AOpCodeSimdReg Op = (AOpCodeSimdReg)Context.CurrOp;
|
||||||
|
|
||||||
|
Context.EmitLdvec(Op.Rd);
|
||||||
|
Context.EmitLdvec(Op.Rn);
|
||||||
|
Context.EmitLdvec(Op.Rm);
|
||||||
|
|
||||||
|
ASoftFallback.EmitCall(Context, nameof(ASoftFallback.SchedulePart2));
|
||||||
|
|
||||||
|
Context.EmitStvec(Op.Rd);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue