aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Translation/ILOpCodeBranch.cs
blob: b0ba23313fb2358ae0390af85a9b98a1513c91d0 (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
    {
        private OpCode   _ilOp;
        private ILLabel _label;

        public ILOpCodeBranch(OpCode ilOp, ILLabel label)
        {
            _ilOp  = ilOp;
            _label = label;
        }

        public void Emit(ILEmitter context)
        {
            context.Generator.Emit(_ilOp, _label.GetLabel(context));
        }
    }
}