OpCode32SimdLong.cs 824 B

123456789101112131415161718192021222324252627
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdLong : OpCode32SimdBase
  4. {
  5. public bool U { get; private set; }
  6. public OpCode32SimdLong(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  7. {
  8. int imm3h = (opCode >> 19) & 0x7;
  9. // The value must be a power of 2, otherwise it is the encoding of another instruction.
  10. switch (imm3h)
  11. {
  12. case 1: Size = 0; break;
  13. case 2: Size = 1; break;
  14. case 4: Size = 2; break;
  15. }
  16. U = ((opCode >> 24) & 0x1) != 0;
  17. RegisterSize = RegisterSize.Simd64;
  18. Vd = ((opCode >> 18) & 0x10) | ((opCode >> 12) & 0xf);
  19. Vm = ((opCode >> 1) & 0x10) | ((opCode >> 0) & 0xf);
  20. }
  21. }
  22. }