OpCode32SimdRev.cs 862 B

12345678910111213141516171819202122
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdRev : OpCode32SimdCmpZ
  4. {
  5. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCode32SimdRev(inst, address, opCode);
  6. public OpCode32SimdRev(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  7. {
  8. if (Opc + Size >= 3)
  9. {
  10. Instruction = InstDescriptor.Undefined;
  11. return;
  12. }
  13. // Currently, this instruction is treated as though it's OPCODE is the true size,
  14. // which lets us deal with reversing vectors on a single element basis (eg. math magic an I64 rather than insert lots of I8s).
  15. int tempSize = Size;
  16. Size = 3 - Opc; // Op 0 is 64 bit, 1 is 32 and so on.
  17. Opc = tempSize;
  18. }
  19. }
  20. }