OpCode32SimdReg.cs 795 B

12345678910111213141516171819202122
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdReg : OpCode32Simd
  4. {
  5. public int Vn { get; private set; }
  6. public int Qn => GetQuadwordIndex(Vn);
  7. public int In => GetQuadwordSubindex(Vn) << (3 - Size);
  8. public int Fn => GetQuadwordSubindex(Vn) << (1 - (Size & 1));
  9. public OpCode32SimdReg(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  10. {
  11. Vn = ((opCode >> 3) & 0x10) | ((opCode >> 16) & 0xf);
  12. // Subclasses have their own handling of Vx to account for before checking.
  13. if (GetType() == typeof(OpCode32SimdReg) && DecoderHelper.VectorArgumentsInvalid(Q, Vd, Vm, Vn))
  14. {
  15. Instruction = InstDescriptor.Undefined;
  16. }
  17. }
  18. }
  19. }