AOpCodeAluRs.cs 737 B

1234567891011121314151617181920212223242526272829
  1. using ChocolArm64.Instruction;
  2. namespace ChocolArm64.Decoder
  3. {
  4. class AOpCodeAluRs : AOpCodeAlu, IAOpCodeAluRs
  5. {
  6. public int Shift { get; private set; }
  7. public int Rm { get; private set; }
  8. public AShiftType ShiftType { get; private set; }
  9. public AOpCodeAluRs(AInst Inst, long Position, int OpCode) : base(Inst, Position, OpCode)
  10. {
  11. int Shift = (OpCode >> 10) & 0x3f;
  12. if (Shift >= GetBitsCount())
  13. {
  14. Emitter = AInstEmit.Und;
  15. return;
  16. }
  17. this.Shift = Shift;
  18. Rm = (OpCode >> 16) & 0x1f;
  19. ShiftType = (AShiftType)((OpCode >> 22) & 0x3);
  20. }
  21. }
  22. }