2018-10-31 02:43:02 +01:00
|
|
|
using System.Reflection.Emit;
|
|
|
|
|
|
|
|
namespace ChocolArm64.Translation
|
|
|
|
{
|
|
|
|
struct ILOpCodeBranch : IILEmit
|
|
|
|
{
|
2019-02-28 03:03:31 +01:00
|
|
|
public OpCode ILOp { get; }
|
|
|
|
public ILLabel Label { get; }
|
2018-10-31 02:43:02 +01:00
|
|
|
|
|
|
|
public ILOpCodeBranch(OpCode ilOp, ILLabel label)
|
|
|
|
{
|
2019-02-28 03:03:31 +01:00
|
|
|
ILOp = ilOp;
|
|
|
|
Label = label;
|
2018-10-31 02:43:02 +01:00
|
|
|
}
|
|
|
|
|
2018-12-11 01:58:52 +01:00
|
|
|
public void Emit(ILMethodBuilder context)
|
2018-10-31 02:43:02 +01:00
|
|
|
{
|
2019-02-28 03:03:31 +01:00
|
|
|
context.Generator.Emit(ILOp, Label.GetLabel(context));
|
2018-10-31 02:43:02 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|