OpCode32SimdS.cs 985 B

12345678910111213141516171819202122232425262728293031
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdS : OpCode32, IOpCode32Simd
  4. {
  5. public int Vd { get; private set; }
  6. public int Vm { get; private set; }
  7. public int Opc { get; protected set; }
  8. public int Size { get; protected set; }
  9. public OpCode32SimdS(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  10. {
  11. Opc = (opCode >> 15) & 0x3;
  12. Size = (opCode >> 8) & 0x3;
  13. bool single = Size != 3;
  14. RegisterSize = single ? RegisterSize.Int32 : RegisterSize.Int64;
  15. if (single)
  16. {
  17. Vm = ((opCode >> 5) & 0x1) | ((opCode << 1) & 0x1e);
  18. Vd = ((opCode >> 22) & 0x1) | ((opCode >> 11) & 0x1e);
  19. }
  20. else
  21. {
  22. Vm = ((opCode >> 1) & 0x10) | ((opCode >> 0) & 0xf);
  23. Vd = ((opCode >> 18) & 0x10) | ((opCode >> 12) & 0xf);
  24. }
  25. }
  26. }
  27. }