OpCode32AluImm.cs 527 B

123456789101112131415161718192021
  1. using ChocolArm64.Instructions;
  2. namespace ChocolArm64.Decoders
  3. {
  4. class OpCode32AluImm : OpCode32Alu
  5. {
  6. public int Imm { get; private set; }
  7. public bool IsRotated { get; private set; }
  8. public OpCode32AluImm(Inst inst, long position, int opCode) : base(inst, position, opCode)
  9. {
  10. int value = (opCode >> 0) & 0xff;
  11. int shift = (opCode >> 8) & 0xf;
  12. Imm = BitUtils.RotateRight(value, shift * 2, 32);
  13. IsRotated = shift != 0;
  14. }
  15. }
  16. }