OpCodeAluRs.cs 717 B

123456789101112131415161718192021222324252627
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCodeAluRs : OpCodeAlu, IOpCodeAluRs
  4. {
  5. public int Shift { get; private set; }
  6. public int Rm { get; private set; }
  7. public ShiftType ShiftType { get; private set; }
  8. public OpCodeAluRs(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  9. {
  10. int shift = (opCode >> 10) & 0x3f;
  11. if (shift >= GetBitsCount())
  12. {
  13. Instruction = InstDescriptor.Undefined;
  14. return;
  15. }
  16. Shift = shift;
  17. Rm = (opCode >> 16) & 0x1f;
  18. ShiftType = (ShiftType)((opCode >> 22) & 0x3);
  19. }
  20. }
  21. }