OpCode32SimdRegS.cs 841 B

1234567891011121314151617181920212223
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32SimdRegS : OpCode32SimdS
  4. {
  5. public int Vn { get; }
  6. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCode32SimdRegS(inst, address, opCode, false);
  7. public new static OpCode CreateT32(InstDescriptor inst, ulong address, int opCode) => new OpCode32SimdRegS(inst, address, opCode, true);
  8. public OpCode32SimdRegS(InstDescriptor inst, ulong address, int opCode, bool isThumb) : base(inst, address, opCode, isThumb)
  9. {
  10. bool single = Size != 3;
  11. if (single)
  12. {
  13. Vn = ((opCode >> 7) & 0x1) | ((opCode >> 15) & 0x1e);
  14. }
  15. else
  16. {
  17. Vn = ((opCode >> 3) & 0x10) | ((opCode >> 16) & 0xf);
  18. }
  19. }
  20. }
  21. }