aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Decoders/OpCode32AluUmull.cs
blob: e4f0895be0886ede8dede8ae79275fcd325dd1b3 (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
27
28
29
30
31
32
namespace ARMeilleure.Decoders
{
    class OpCode32AluUmull : OpCode32
    {
        public int RdLo { get; }
        public int RdHi { get; }
        public int Rn { get; }
        public int Rm { get; }

        public bool NHigh { get; }
        public bool MHigh { get; }

        public bool SetFlags { get; }
        public DataOp DataOp { get; }

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

        public OpCode32AluUmull(InstDescriptor inst, ulong address, int opCode) : base(inst, address, opCode)
        {
            RdLo = (opCode >> 12) & 0xf;
            RdHi = (opCode >> 16) & 0xf;
            Rm = (opCode >> 8) & 0xf;
            Rn = (opCode >> 0) & 0xf;

            NHigh = ((opCode >> 5) & 0x1) == 1;
            MHigh = ((opCode >> 6) & 0x1) == 1;

            SetFlags = ((opCode >> 20) & 0x1) != 0;
            DataOp = DataOp.Arithmetic;
        }
    }
}