OpCode32AluImm.cs 542 B

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