InstEmitSimdHash32.cs
1 using ARMeilleure.Decoders; 2 using ARMeilleure.IntermediateRepresentation; 3 using ARMeilleure.Translation; 4 5 using static ARMeilleure.Instructions.InstEmitHelper; 6 7 namespace ARMeilleure.Instructions 8 { 9 static partial class InstEmit32 10 { 11 #region "Sha256" 12 public static void Sha256h_V(ArmEmitterContext context) 13 { 14 OpCode32SimdReg op = (OpCode32SimdReg)context.CurrOp; 15 16 Operand d = GetVecA32(op.Qd); 17 Operand n = GetVecA32(op.Qn); 18 Operand m = GetVecA32(op.Qm); 19 20 Operand res = InstEmitSimdHashHelper.EmitSha256h(context, d, n, m, part2: false); 21 22 context.Copy(GetVecA32(op.Qd), res); 23 } 24 25 public static void Sha256h2_V(ArmEmitterContext context) 26 { 27 OpCode32SimdReg op = (OpCode32SimdReg)context.CurrOp; 28 29 Operand d = GetVecA32(op.Qd); 30 Operand n = GetVecA32(op.Qn); 31 Operand m = GetVecA32(op.Qm); 32 33 Operand res = InstEmitSimdHashHelper.EmitSha256h(context, n, d, m, part2: true); 34 35 context.Copy(GetVecA32(op.Qd), res); 36 } 37 38 public static void Sha256su0_V(ArmEmitterContext context) 39 { 40 OpCode32Simd op = (OpCode32Simd)context.CurrOp; 41 42 Operand d = GetVecA32(op.Qd); 43 Operand m = GetVecA32(op.Qm); 44 45 Operand res = InstEmitSimdHashHelper.EmitSha256su0(context, d, m); 46 47 context.Copy(GetVecA32(op.Qd), res); 48 } 49 50 public static void Sha256su1_V(ArmEmitterContext context) 51 { 52 OpCode32SimdReg op = (OpCode32SimdReg)context.CurrOp; 53 54 Operand d = GetVecA32(op.Qd); 55 Operand n = GetVecA32(op.Qn); 56 Operand m = GetVecA32(op.Qm); 57 58 Operand res = InstEmitSimdHashHelper.EmitSha256su1(context, d, n, m); 59 60 context.Copy(GetVecA32(op.Qd), res); 61 } 62 #endregion 63 } 64 }