diff options
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdCrypto.cs')
-rw-r--r-- | ARMeilleure/Instructions/InstEmitSimdCrypto.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdCrypto.cs b/ARMeilleure/Instructions/InstEmitSimdCrypto.cs index 5b470567..db24e029 100644 --- a/ARMeilleure/Instructions/InstEmitSimdCrypto.cs +++ b/ARMeilleure/Instructions/InstEmitSimdCrypto.cs @@ -16,13 +16,14 @@ namespace ARMeilleure.Instructions 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(new _V128_V128_V128(SoftFallback.Decrypt), d, n); + res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.Decrypt)), d, n); } context.Copy(d, res); @@ -36,13 +37,14 @@ namespace ARMeilleure.Instructions 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(new _V128_V128_V128(SoftFallback.Encrypt), d, n); + res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.Encrypt)), d, n); } context.Copy(d, res); @@ -55,13 +57,14 @@ namespace ARMeilleure.Instructions Operand n = GetVec(op.Rn); Operand res; + if (Optimizations.UseAesni) { res = context.AddIntrinsic(Intrinsic.X86Aesimc, n); } else { - res = context.Call(new _V128_V128(SoftFallback.InverseMixColumns), n); + res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.InverseMixColumns)), n); } context.Copy(GetVec(op.Rd), res); @@ -74,6 +77,7 @@ namespace ARMeilleure.Instructions Operand n = GetVec(op.Rn); Operand res; + if (Optimizations.UseAesni) { Operand roundKey = context.VectorZero(); @@ -86,7 +90,7 @@ namespace ARMeilleure.Instructions } else { - res = context.Call(new _V128_V128(SoftFallback.MixColumns), n); + res = context.Call(typeof(SoftFallback).GetMethod(nameof(SoftFallback.MixColumns)), n); } context.Copy(GetVec(op.Rd), res); |