OpCodeAluRs64.cs 733 B

1234567891011121314151617181920212223242526272829
  1. using ChocolArm64.Instructions;
  2. namespace ChocolArm64.Decoders
  3. {
  4. class OpCodeAluRs64 : OpCodeAlu64, IOpCodeAluRs64
  5. {
  6. public int Shift { get; private set; }
  7. public int Rm { get; private set; }
  8. public ShiftType ShiftType { get; private set; }
  9. public OpCodeAluRs64(Inst inst, long position, int opCode) : base(inst, position, opCode)
  10. {
  11. int shift = (opCode >> 10) & 0x3f;
  12. if (shift >= GetBitsCount())
  13. {
  14. Emitter = InstEmit.Und;
  15. return;
  16. }
  17. Shift = shift;
  18. Rm = (opCode >> 16) & 0x1f;
  19. ShiftType = (ShiftType)((opCode >> 22) & 0x3);
  20. }
  21. }
  22. }