aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoders/OpCodeSystem64.cs
blob: 41c51565d9cbba382ce97511a0150d12e3362b10 (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
using ChocolArm64.Instructions;

namespace ChocolArm64.Decoders
{
    class OpCodeSystem64 : OpCode64
    {
        public int Rt  { get; private set; }
        public int Op2 { get; private set; }
        public int CRm { get; private set; }
        public int CRn { get; private set; }
        public int Op1 { get; private set; }
        public int Op0 { get; private set; }

        public OpCodeSystem64(Inst inst, long position, int opCode) : base(inst, position, opCode)
        {
            Rt  =  (opCode >>  0) & 0x1f;
            Op2 =  (opCode >>  5) & 0x7;
            CRm =  (opCode >>  8) & 0xf;
            CRn =  (opCode >> 12) & 0xf;
            Op1 =  (opCode >> 16) & 0x7;
            Op0 = ((opCode >> 19) & 0x1) | 2;
        }
    }
}