OpCode32SimdRev.cs 726 B

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