OpCodeT32MemImm12.cs 781 B

12345678910111213141516171819202122232425
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCodeT32MemImm12 : OpCodeT32, IOpCode32Mem
  4. {
  5. public int Rt { get; }
  6. public int Rn { get; }
  7. public bool WBack => false;
  8. public bool IsLoad { get; }
  9. public bool Index => true;
  10. public bool Add => true;
  11. public int Immediate { get; }
  12. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeT32MemImm12(inst, address, opCode);
  13. public OpCodeT32MemImm12(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  14. {
  15. Rt = (opCode >> 12) & 0xf;
  16. Rn = (opCode >> 16) & 0xf;
  17. Immediate = opCode & 0xfff;
  18. IsLoad = ((opCode >> 20) & 1) != 0;
  19. }
  20. }
  21. }