diff options
| author | TSR Berry <20988865+TSRBerry@users.noreply.github.com> | 2023-04-08 01:22:00 +0200 |
|---|---|---|
| committer | Mary <thog@protonmail.com> | 2023-04-27 23:51:14 +0200 |
| commit | cee712105850ac3385cd0091a923438167433f9f (patch) | |
| tree | 4a5274b21d8b7f938c0d0ce18736d3f2993b11b1 /ARMeilleure/Instructions/InstEmitSimdCrypto.cs | |
| parent | cd124bda587ef09668a971fa1cac1c3f0cfc9f21 (diff) | |
Move solution and projects to src
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdCrypto.cs')
| -rw-r--r-- | ARMeilleure/Instructions/InstEmitSimdCrypto.cs | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdCrypto.cs b/ARMeilleure/Instructions/InstEmitSimdCrypto.cs deleted file mode 100644 index db24e029..00000000 --- a/ARMeilleure/Instructions/InstEmitSimdCrypto.cs +++ /dev/null @@ -1,99 +0,0 @@ -using ARMeilleure.Decoders; -using ARMeilleure.IntermediateRepresentation; -using ARMeilleure.Translation; - -using static ARMeilleure.Instructions.InstEmitHelper; - -namespace ARMeilleure.Instructions -{ - static partial class InstEmit - { - public static void Aesd_V(ArmEmitterContext context) - { - OpCodeSimd op = (OpCodeSimd)context.CurrOp; - - Operand d = GetVec(op.Rd); - Operand n = GetVec(op.Rn); - - Operand res; - - if (Optimizations.UseAesni) - { - res = context.AddIntrinsic(Intrinsic.X86Aesdeclast, context.AddIntrinsic(Intrinsic.X86Xorpd, d, n), context.VectorZero()); - } - else - { - res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.Decrypt)), d, n); - } - - context.Copy(d, res); - } - - public static void Aese_V(ArmEmitterContext context) - { - OpCodeSimd op = (OpCodeSimd)context.CurrOp; - - Operand d = GetVec(op.Rd); - Operand n = GetVec(op.Rn); - - Operand res; - - if (Optimizations.UseAesni) - { - res = context.AddIntrinsic(Intrinsic.X86Aesenclast, context.AddIntrinsic(Intrinsic.X86Xorpd, d, n), context.VectorZero()); - } - else - { - res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.Encrypt)), d, n); - } - - context.Copy(d, res); - } - - public static void Aesimc_V(ArmEmitterContext context) - { - OpCodeSimd op = (OpCodeSimd)context.CurrOp; - - Operand n = GetVec(op.Rn); - - Operand res; - - if (Optimizations.UseAesni) - { - res = context.AddIntrinsic(Intrinsic.X86Aesimc, n); - } - else - { - res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.InverseMixColumns)), n); - } - - context.Copy(GetVec(op.Rd), res); - } - - public static void Aesmc_V(ArmEmitterContext context) - { - OpCodeSimd op = (OpCodeSimd)context.CurrOp; - - Operand n = GetVec(op.Rn); - - Operand res; - - if (Optimizations.UseAesni) - { - Operand roundKey = context.VectorZero(); - - // Inverse Shift Rows, Inverse Sub Bytes, xor 0 so nothing happens - res = context.AddIntrinsic(Intrinsic.X86Aesdeclast, n, roundKey); - - // Shift Rows, Sub Bytes, Mix Columns (!), xor 0 so nothing happens - res = context.AddIntrinsic(Intrinsic.X86Aesenc, res, roundKey); - } - else - { - res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.MixColumns)), n); - } - - context.Copy(GetVec(op.Rd), res); - } - } -} |
