aboutsummaryrefslogtreecommitdiff
path: root/src/ARMeilleure/Decoders/OpCodeT16MemLit.cs
blob: 63a452ad3b63852797e3a102d85f4de6cf3ff46f (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
25
26
using ARMeilleure.State;

namespace ARMeilleure.Decoders
{
    class OpCodeT16MemLit : OpCodeT16, IOpCode32Mem
    {
        public int Rt { get; }
        public int Rn => RegisterAlias.Aarch32Pc;

        public bool WBack => false;
        public bool IsLoad => true;
        public bool Index => true;
        public bool Add => true;

        public int Immediate { get; }

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

        public OpCodeT16MemLit(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            Rt = (opCode >> 8) & 7;

            Immediate = (opCode & 0xff) << 2;
        }
    }
}