OpCodeSimdFmov64.cs 818 B

123456789101112131415161718192021222324252627282930313233
  1. using ChocolArm64.Instructions;
  2. namespace ChocolArm64.Decoders
  3. {
  4. class OpCodeSimdFmov64 : OpCode64, IOpCodeSimd64
  5. {
  6. public int Rd { get; private set; }
  7. public long Imm { get; private set; }
  8. public int Size { get; private set; }
  9. public OpCodeSimdFmov64(Inst inst, long position, int opCode) : base(inst, position, opCode)
  10. {
  11. int imm5 = (opCode >> 5) & 0x1f;
  12. int type = (opCode >> 22) & 0x3;
  13. if (imm5 != 0b00000 || type > 1)
  14. {
  15. Emitter = InstEmit.Und;
  16. return;
  17. }
  18. Size = type;
  19. long imm;
  20. Rd = (opCode >> 0) & 0x1f;
  21. imm = (opCode >> 13) & 0xff;
  22. Imm = DecoderHelper.DecodeImm8Float(imm, type);
  23. }
  24. }
  25. }