OpCodeSystem.cs 782 B

123456789101112131415161718192021222324
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCodeSystem : OpCode
  4. {
  5. public int Rt { get; }
  6. public int Op2 { get; }
  7. public int CRm { get; }
  8. public int CRn { get; }
  9. public int Op1 { get; }
  10. public int Op0 { get; }
  11. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeSystem(inst, address, opCode);
  12. public OpCodeSystem(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  13. {
  14. Rt = (opCode >> 0) & 0x1f;
  15. Op2 = (opCode >> 5) & 0x7;
  16. CRm = (opCode >> 8) & 0xf;
  17. CRn = (opCode >> 12) & 0xf;
  18. Op1 = (opCode >> 16) & 0x7;
  19. Op0 = ((opCode >> 19) & 0x1) | 2;
  20. }
  21. }
  22. }