aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/InstEmitSimdHashHelper.cs
diff options
context:
space:
mode:
authorTSR Berry <20988865+TSRBerry@users.noreply.github.com>2023-04-08 01:22:00 +0200
committerMary <thog@protonmail.com>2023-04-27 23:51:14 +0200
commitcee712105850ac3385cd0091a923438167433f9f (patch)
tree4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /ARMeilleure/Instructions/InstEmitSimdHashHelper.cs
parentcd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff)
Move solution and projects to src
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdHashHelper.cs')
-rw-r--r--ARMeilleure/Instructions/InstEmitSimdHashHelper.cs56
1 files changed, 0 insertions, 56 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdHashHelper.cs b/ARMeilleure/Instructions/InstEmitSimdHashHelper.cs
deleted file mode 100644
index 23e4948d..00000000
--- a/ARMeilleure/Instructions/InstEmitSimdHashHelper.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using ARMeilleure.IntermediateRepresentation;
-using ARMeilleure.Translation;
-using System;
-
-using static ARMeilleure.IntermediateRepresentation.Operand.Factory;
-
-namespace ARMeilleure.Instructions
-{
- static class InstEmitSimdHashHelper
- {
- public static Operand EmitSha256h(ArmEmitterContext context, Operand x, Operand y, Operand w, bool part2)
- {
- if (Optimizations.UseSha)
- {
- Operand src1 = context.AddIntrinsic(Intrinsic.X86Shufps, y, x, Const(0xbb));
- Operand src2 = context.AddIntrinsic(Intrinsic.X86Shufps, y, x, Const(0x11));
- Operand w2 = context.AddIntrinsic(Intrinsic.X86Punpckhqdq, w, w);
-
- Operand round2 = context.AddIntrinsic(Intrinsic.X86Sha256Rnds2, src1, src2, w);
- Operand round4 = context.AddIntrinsic(Intrinsic.X86Sha256Rnds2, src2, round2, w2);
-
- Operand res = context.AddIntrinsic(Intrinsic.X86Shufps, round4, round2, Const(part2 ? 0x11 : 0xbb));
-
- return res;
- }
-
- String method = part2 ? nameof(SoftFallback.HashUpper) : nameof(SoftFallback.HashLower);
- return context.Call(typeof(SoftFallback).GetMethod(method), x, y, w);
- }
-
- public static Operand EmitSha256su0(ArmEmitterContext context, Operand x, Operand y)
- {
- if (Optimizations.UseSha)
- {
- return context.AddIntrinsic(Intrinsic.X86Sha256Msg1, x, y);
- }
-
- return context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.Sha256SchedulePart1)), x, y);
- }
-
- public static Operand EmitSha256su1(ArmEmitterContext context, Operand x, Operand y, Operand z)
- {
- if (Optimizations.UseSha && Optimizations.UseSsse3)
- {
- Operand extr = context.AddIntrinsic(Intrinsic.X86Palignr, z, y, Const(4));
- Operand tmp = context.AddIntrinsic(Intrinsic.X86Paddd, extr, x);
-
- Operand res = context.AddIntrinsic(Intrinsic.X86Sha256Msg2, tmp, z);
-
- return res;
- }
-
- return context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.Sha256SchedulePart2)), x, y, z);
- }
- }
-} \ No newline at end of file