OpCode32SimdMovGp.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdMovGp : OpCode32, IOpCode32Simd
  4. {
  5. public int Size => 2;
  6. public int Vn { get; }
  7. public int Rt { get; }
  8. public int Op { get; }
  9. public int Opc1 { get; }
  10. public int Opc2 { get; }
  11. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCode32SimdMovGp(inst, address, opCode, false);
  12. public static OpCode CreateT32(InstDescriptor inst, ulong address, int opCode) => new OpCode32SimdMovGp(inst, address, opCode, true);
  13. public OpCode32SimdMovGp(InstDescriptor inst, ulong address, int opCode, bool isThumb) : base(inst, address, opCode)
  14. {
  15. IsThumb = isThumb;
  16. // Which one is used is instruction dependant.
  17. Op = (opCode >> 20) & 0x1;
  18. Opc1 = (opCode >> 21) & 0x3;
  19. Opc2 = (opCode >> 5) & 0x3;
  20. Vn = ((opCode >> 7) & 0x1) | ((opCode >> 15) & 0x1e);
  21. Rt = (opCode >> 12) & 0xf;
  22. }
  23. }
  24. }