Cosmos/source/Cosmos.IL2CPU/IL/Endfinally.cs
José Pedro 3db5ce43bb Compiler fixes.
Compiler fixes.
Updated project.json files.
Removed *.lock.json files and updated gitignore to ignore them.
Updated some Cosmos.Debug projects.
2017-01-08 14:54:29 +00:00

21 lines
830 B
C#

using CPUx86 = Cosmos.Assembler.x86;
using XSharp.Compiler;
using static XSharp.Compiler.XSRegisters;
namespace Cosmos.IL2CPU.X86.IL
{
[OpCode(ILOpCode.Code.Endfinally)]
public class Endfinally : ILOp
{
public Endfinally(Cosmos.Assembler.Assembler aAsmblr) : base(aAsmblr)
{
}
public override void Execute(MethodInfo aMethod, ILOpCode aOpCode)
{
XS.DataMember(aMethod.MethodBase.GetFullName() + "_" + "LeaveAddress_" + aOpCode.CurrentExceptionRegion.Value.HandlerOffset.ToString("X2"), 0);
XS.Set(EAX, aMethod.MethodBase.GetFullName() + "_" + "LeaveAddress_" + aOpCode.CurrentExceptionRegion.Value.HandlerOffset.ToString("X2"));
new CPUx86.Jump { DestinationReg = EAX, DestinationIsIndirect = true };
}
}
}