AOpCodeSimdRegElem.cs 739 B

12345678910111213141516171819202122232425262728293031
  1. using ChocolArm64.Instruction;
  2. namespace ChocolArm64.Decoder
  3. {
  4. class AOpCodeSimdRegElem : AOpCodeSimdReg
  5. {
  6. public int Index { get; private set; }
  7. public AOpCodeSimdRegElem(AInst Inst, long Position, int OpCode) : base(Inst, Position, OpCode)
  8. {
  9. switch (Size)
  10. {
  11. case 1:
  12. Index = (OpCode >> 20) & 3 |
  13. (OpCode >> 9) & 4;
  14. Rm &= 0xf;
  15. break;
  16. case 2:
  17. Index = (OpCode >> 21) & 1 |
  18. (OpCode >> 10) & 2;
  19. break;
  20. default: Emitter = AInstEmit.Und; return;
  21. }
  22. }
  23. }
  24. }