aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Decoders/OpCodeT16AluImm8.cs
blob: d31f37a27d78d402ab84fe89391e30ddbe7d436a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace ARMeilleure.Decoders
{
    class OpCodeT16AluImm8 : OpCodeT16, IOpCode32Alu
    {
        private int _rdn;

        public int Rd => _rdn;
        public int Rn => _rdn;

        public bool SetFlags => false;

        public int Immediate { get; }

        public new static OpCode Create(InstDescriptor inst, ulong address, int opCode) => new OpCodeT16AluImm8(inst, address, opCode);

        public OpCodeT16AluImm8(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            Immediate = (opCode >> 0) & 0xff;
            _rdn      = (opCode >> 8) & 0x7;
        }
    }
}