OpCode32Simd.cs 1.1 KB

123456789101112131415161718192021222324252627282930
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32Simd : OpCode32SimdBase
  4. {
  5. public int Opc { get; protected set; }
  6. public bool Q { get; protected set; }
  7. public bool F { get; protected set; }
  8. public bool U { get; private set; }
  9. public OpCode32Simd(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  10. {
  11. Size = (opCode >> 20) & 0x3;
  12. Q = ((opCode >> 6) & 0x1) != 0;
  13. F = ((opCode >> 10) & 0x1) != 0;
  14. U = ((opCode >> 24) & 0x1) != 0;
  15. Opc = (opCode >> 7) & 0x3;
  16. RegisterSize = Q ? RegisterSize.Simd128 : RegisterSize.Simd64;
  17. Vd = ((opCode >> 18) & 0x10) | ((opCode >> 12) & 0xf);
  18. Vm = ((opCode >> 1) & 0x10) | ((opCode >> 0) & 0xf);
  19. // Subclasses have their own handling of Vx to account for before checking.
  20. if (GetType() == typeof(OpCode32Simd) && DecoderHelper.VectorArgumentsInvalid(Q, Vd, Vm))
  21. {
  22. Instruction = InstDescriptor.Undefined;
  23. }
  24. }
  25. }
  26. }