aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Translation/ILOpCodeBranch.cs
blob: 9d4e40fa9dea1f1c737af9345b19165763449819 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System.Reflection.Emit;

namespace ChocolArm64.Translation
{
    struct ILOpCodeBranch : IILEmit
    {
        public OpCode  ILOp  { get; }
        public ILLabel Label { get; }

        public ILOpCodeBranch(OpCode ilOp, ILLabel label)
        {
            ILOp  = ilOp;
            Label = label;
        }

        public void Emit(ILMethodBuilder context)
        {
            context.Generator.Emit(ILOp, Label.GetLabel(context));
        }
    }
}