InstEmitSimdCrypto.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using ARMeilleure.Decoders;
  2. using ARMeilleure.IntermediateRepresentation;
  3. using ARMeilleure.Translation;
  4. using static ARMeilleure.Instructions.InstEmitHelper;
  5. namespace ARMeilleure.Instructions
  6. {
  7. static partial class InstEmit
  8. {
  9. public static void Aesd_V(ArmEmitterContext context)
  10. {
  11. OpCodeSimd op = (OpCodeSimd)context.CurrOp;
  12. Operand d = GetVec(op.Rd);
  13. Operand n = GetVec(op.Rn);
  14. context.Copy(d, context.Call(new _V128_V128_V128(SoftFallback.Decrypt), d, n));
  15. }
  16. public static void Aese_V(ArmEmitterContext context)
  17. {
  18. OpCodeSimd op = (OpCodeSimd)context.CurrOp;
  19. Operand d = GetVec(op.Rd);
  20. Operand n = GetVec(op.Rn);
  21. context.Copy(d, context.Call(new _V128_V128_V128(SoftFallback.Encrypt), d, n));
  22. }
  23. public static void Aesimc_V(ArmEmitterContext context)
  24. {
  25. OpCodeSimd op = (OpCodeSimd)context.CurrOp;
  26. Operand n = GetVec(op.Rn);
  27. context.Copy(GetVec(op.Rd), context.Call(new _V128_V128(SoftFallback.InverseMixColumns), n));
  28. }
  29. public static void Aesmc_V(ArmEmitterContext context)
  30. {
  31. OpCodeSimd op = (OpCodeSimd)context.CurrOp;
  32. Operand n = GetVec(op.Rn);
  33. context.Copy(GetVec(op.Rd), context.Call(new _V128_V128(SoftFallback.MixColumns), n));
  34. }
  35. }
  36. }