OpCode32SimdLong.cs 948 B

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