aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Decoders/OpCodeT16AddSubImm3.cs
blob: 95f1805485dd95e283796c3477d2a7827249f4cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace ARMeilleure.Decoders
{
    class OpCodeT16AddSubImm3: OpCodeT16, IOpCode32AluImm
    {
        public int Rd { get; }
        public int Rn { get; }

        public bool? SetFlags => null;

        public int Immediate { get; }

        public bool IsRotated { get; }

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

        public OpCodeT16AddSubImm3(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            Rd        = (opCode >> 0) & 0x7;
            Rn        = (opCode >> 3) & 0x7;
            Immediate = (opCode >> 6) & 0x7;
            IsRotated = false;
        }
    }
}