OpCodeMemPair64.cs 703 B

12345678910111213141516171819202122232425
  1. using ChocolArm64.Instructions;
  2. namespace ChocolArm64.Decoders
  3. {
  4. class OpCodeMemPair64 : OpCodeMemImm64
  5. {
  6. public int Rt2 { get; private set; }
  7. public OpCodeMemPair64(Inst inst, long position, int opCode) : base(inst, position, opCode)
  8. {
  9. Rt2 = (opCode >> 10) & 0x1f;
  10. WBack = ((opCode >> 23) & 0x1) != 0;
  11. PostIdx = ((opCode >> 23) & 0x3) == 1;
  12. Extend64 = ((opCode >> 30) & 0x3) == 1;
  13. Size = ((opCode >> 31) & 0x1) | 2;
  14. DecodeImm(opCode);
  15. }
  16. protected void DecodeImm(int opCode)
  17. {
  18. Imm = ((long)(opCode >> 15) << 57) >> (57 - Size);
  19. }
  20. }
  21. }