OpCode32SimdRev.cs 1.0 KB

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