OpCodeSimdMemImm.cs 840 B

12345678910111213141516171819202122232425262728
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCodeSimdMemImm : OpCodeMemImm, IOpCodeSimd
  4. {
  5. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeSimdMemImm(inst, address, opCode);
  6. public OpCodeSimdMemImm(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  7. {
  8. Size |= (opCode >> 21) & 4;
  9. if (Size > 4)
  10. {
  11. Instruction = InstDescriptor.Undefined;
  12. return;
  13. }
  14. // Base class already shifts the immediate, we only
  15. // need to shift it if size (scale) is 4, since this value is only set here.
  16. if (!WBack && !Unscaled && Size == 4)
  17. {
  18. Immediate <<= 4;
  19. }
  20. Extend64 = false;
  21. }
  22. }
  23. }