aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Instructions/InstEmitSimdCrypto32.cs
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2020-03-13 23:29:58 +0000
committerGitHub <noreply@github.com>2020-03-14 10:29:58 +1100
commitdd433c1296bbd82e5e42bf8de1731a4eaadcfdb5 (patch)
treea77472d331a7b4af4fd516a5f6de44ca7417376d /ARMeilleure/Instructions/InstEmitSimdCrypto32.cs
parentff2bac9c9042ef23437b19a32f3f2b6869cc1274 (diff)
Implement AESMC, AESIMC, AESE, AESD and VEOR AArch32 instructions (#982)
* Add VEOR and AES instructions. * Add tests for crypto instructions. * Update ValueSource name.
Diffstat (limited to 'ARMeilleure/Instructions/InstEmitSimdCrypto32.cs')
-rw-r--r--ARMeilleure/Instructions/InstEmitSimdCrypto32.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/ARMeilleure/Instructions/InstEmitSimdCrypto32.cs b/ARMeilleure/Instructions/InstEmitSimdCrypto32.cs
new file mode 100644
index 00000000..1cfce3ad
--- /dev/null
+++ b/ARMeilleure/Instructions/InstEmitSimdCrypto32.cs
@@ -0,0 +1,49 @@
+using ARMeilleure.Decoders;
+using ARMeilleure.IntermediateRepresentation;
+using ARMeilleure.Translation;
+
+using static ARMeilleure.Instructions.InstEmitHelper;
+
+namespace ARMeilleure.Instructions
+{
+ partial class InstEmit32
+ {
+ public static void Aesd_V(ArmEmitterContext context)
+ {
+ OpCode32Simd op = (OpCode32Simd)context.CurrOp;
+
+ Operand d = GetVecA32(op.Qd);
+ Operand n = GetVecA32(op.Qm);
+
+ context.Copy(d, context.Call(new _V128_V128_V128(SoftFallback.Decrypt), d, n));
+ }
+
+ public static void Aese_V(ArmEmitterContext context)
+ {
+ OpCode32Simd op = (OpCode32Simd)context.CurrOp;
+
+ Operand d = GetVecA32(op.Qd);
+ Operand n = GetVecA32(op.Qm);
+
+ context.Copy(d, context.Call(new _V128_V128_V128(SoftFallback.Encrypt), d, n));
+ }
+
+ public static void Aesimc_V(ArmEmitterContext context)
+ {
+ OpCode32Simd op = (OpCode32Simd)context.CurrOp;
+
+ Operand n = GetVecA32(op.Qm);
+
+ context.Copy(GetVec(op.Qd), context.Call(new _V128_V128(SoftFallback.InverseMixColumns), n));
+ }
+
+ public static void Aesmc_V(ArmEmitterContext context)
+ {
+ OpCode32Simd op = (OpCode32Simd)context.CurrOp;
+
+ Operand n = GetVecA32(op.Qm);
+
+ context.Copy(GetVec(op.Qd), context.Call(new _V128_V128(SoftFallback.MixColumns), n));
+ }
+ }
+}