OpCodeSimd.cs 790 B

123456789101112131415161718192021222324
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCodeSimd : OpCode, IOpCodeSimd
  4. {
  5. public int Rd { get; }
  6. public int Rn { get; }
  7. public int Opc { get; }
  8. public int Size { get; protected set; }
  9. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeSimd(inst, address, opCode);
  10. public OpCodeSimd(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  11. {
  12. Rd = (opCode >> 0) & 0x1f;
  13. Rn = (opCode >> 5) & 0x1f;
  14. Opc = (opCode >> 15) & 0x3;
  15. Size = (opCode >> 22) & 0x3;
  16. RegisterSize = ((opCode >> 30) & 1) != 0
  17. ? RegisterSize.Simd128
  18. : RegisterSize.Simd64;
  19. }
  20. }
  21. }