aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Decoders/OpCodeBImmCond64.cs
blob: 227023092ed51b26d763ee104a8e63b0dec20b36 (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
using ChocolArm64.Instructions;

namespace ChocolArm64.Decoders
{
    class OpCodeBImmCond64 : OpCodeBImm64, IOpCodeCond64
    {
        public Cond Cond { get; private set; }

        public OpCodeBImmCond64(Inst inst, long position, int opCode) : base(inst, position, opCode)
        {
            int o0 = (opCode >> 4) & 1;

            if (o0 != 0)
            {
                Emitter = InstEmit.Und;

                return;
            }

            Cond = (Cond)(opCode & 0xf);

            Imm = position + DecoderHelper.DecodeImmS19_2(opCode);
        }
    }
}