aboutsummaryrefslogtreecommitdiff
path: root/src/ARMeilleure/Decoders/OpCodeT16AddSubSp.cs
blob: b66fe0cdffcbc3fe199593f5127392f5bae94da8 (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
using ARMeilleure.State;

namespace ARMeilleure.Decoders
{
    class OpCodeT16AddSubSp : OpCodeT16, IOpCode32AluImm
    {
        public int Rd => RegisterAlias.Aarch32Sp;
        public int Rn => RegisterAlias.Aarch32Sp;

        public bool? SetFlags => false;

        public int Immediate { get; }

        public bool IsRotated => false;

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

        public OpCodeT16AddSubSp(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            Immediate = ((opCode >> 0) & 0x7f) << 2;
        }
    }
}