OpCode32AluImm16.cs 548 B

1234567891011121314151617
  1. namespace ARMeilleure.Decoders
  2. {
  3. class OpCode32AluImm16 : OpCode32Alu, IOpCode32AluImm16
  4. {
  5. public int Immediate { get; }
  6. public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCode32AluImm16(inst, address, opCode);
  7. public OpCode32AluImm16(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
  8. {
  9. int imm12 = opCode & 0xfff;
  10. int imm4 = (opCode >> 16) & 0xf;
  11. Immediate = (imm4 << 12) | imm12;
  12. }
  13. }
  14. }