mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using System;
|
|
using CPUx86 = Cosmos.Assembler.x86;
|
|
namespace Cosmos.IL2CPU.X86.IL
|
|
{
|
|
[Cosmos.IL2CPU.OpCode( ILOpCode.Code.Leave )]
|
|
public class Leave : ILOp
|
|
{
|
|
public Leave( Cosmos.Assembler.Assembler aAsmblr )
|
|
: base( aAsmblr )
|
|
{
|
|
}
|
|
|
|
public override void Execute( MethodInfo aMethod, ILOpCode aOpCode )
|
|
{
|
|
new CPUx86.Jump { DestinationLabel = AppAssembler.TmpBranchLabel( aMethod, aOpCode ) };
|
|
}
|
|
|
|
|
|
// using System;
|
|
// using System.IO;
|
|
//
|
|
//
|
|
// using CPU = Cosmos.Assembler.x86;
|
|
//
|
|
// namespace Cosmos.IL2CPU.IL.X86 {
|
|
// [Cosmos.Assembler.OpCode(OpCodeEnum.Leave)]
|
|
// public class Leave: Op {public readonly string TargetLabel;
|
|
// public Leave(ILReader aReader, MethodInformation aMethodInfo)
|
|
// : base(aReader, aMethodInfo) {
|
|
// TargetLabel = GetInstructionLabel(aReader.OperandValueBranchPosition);
|
|
// }
|
|
// public override void DoAssemble() {
|
|
// new CPU.Jump { DestinationLabel = TargetLabel };
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
}
|
|
}
|