ILOpCodeBranch.cs 448 B

123456789101112131415161718192021
  1. using System.Reflection.Emit;
  2. namespace ChocolArm64.Translation
  3. {
  4. struct ILOpCodeBranch : IILEmit
  5. {
  6. private OpCode _ilOp;
  7. private ILLabel _label;
  8. public ILOpCodeBranch(OpCode ilOp, ILLabel label)
  9. {
  10. _ilOp = ilOp;
  11. _label = label;
  12. }
  13. public void Emit(ILEmitter context)
  14. {
  15. context.Generator.Emit(_ilOp, _label.GetLabel(context));
  16. }
  17. }
  18. }