aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoders/OpCodeAdr64.cs
blob: 98b2f07bbe809d94e80b84f691177b192080afa1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using ChocolArm64.Instructions;

namespace ChocolArm64.Decoders
{
    class OpCodeAdr64 : OpCode64
    {
        public int  Rd  { get; private set; }
        public long Imm { get; private set; }

         public OpCodeAdr64(Inst inst, long position, int opCode) : base(inst, position, opCode)
        {
            Rd = opCode & 0x1f;

            Imm  = DecoderHelper.DecodeImmS19_2(opCode);
            Imm |= ((long)opCode >> 29) & 3;
        }
    }
}