aboutsummaryrefslogtreecommitdiff
path: root/ChocolArm64/Translation/AILOpCodeBranch.cs
blob: e4caad1ffa6f4f4e06d85ed6541a9e62a8c541bc (plain)
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 AILOpCodeBranch : IAILEmit
    {
        private OpCode   ILOp;
        private AILLabel Label;

        public AILOpCodeBranch(OpCode ILOp, AILLabel Label)
        {
            this.ILOp  = ILOp;
            this.Label = Label;
        }

        public void Emit(AILEmitter Context)
        {
            Context.Generator.Emit(ILOp, Label.GetLabel(Context));
        }
    }
}