OpCode32SimdDupGP.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdDupGP : OpCode32, IOpCode32Simd
  4. {
  5. public int Size { get; private set; }
  6. public int Vd { get; private set; }
  7. public int Rt { get; private set; }
  8. public bool Q { get; private set; }
  9. public OpCode32SimdDupGP(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  10. {
  11. Size = 2 - (((opCode >> 21) & 0x2) | ((opCode >> 5) & 0x1)); // B:E - 0 for 32, 16 then 8.
  12. if (Size == -1)
  13. {
  14. Instruction = InstDescriptor.Undefined;
  15. return;
  16. }
  17. Q = ((opCode >> 21) & 0x1) != 0;
  18. RegisterSize = Q ? RegisterSize.Simd128 : RegisterSize.Simd64;
  19. Vd = ((opCode >> 3) & 0x10) | ((opCode >> 16) & 0xf);
  20. Rt = ((opCode >> 12) & 0xf);
  21. if (DecoderHelper.VectorArgumentsInvalid(Q, Vd))
  22. {
  23. Instruction = InstDescriptor.Undefined;
  24. }
  25. }
  26. }
  27. }