Cosmos/source/Compiler/Indy.IL2CPU.X86/IL/x86/X86InitVmtImplementationOp.cs
2009-06-10 15:09:28 +00:00

40 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CPU = Indy.IL2CPU.Assembler;
using CPUx86 = Indy.IL2CPU.Assembler.X86;
using System.Reflection;
using Indy.IL2CPU.Assembler;
namespace Indy.IL2CPU.IL.X86 {
public class X86InitVmtImplementationOp: InitVmtImplementationOp {
public X86InitVmtImplementationOp(ILReader aReader, MethodInformation aMethodInfo)
: base(aReader, aMethodInfo) {
}
protected override void Move(string aDestLabelName, int aValue)
{
new CPUx86.Move
{
DestinationRef = ElementReference.New(aDestLabelName),
DestinationIsIndirect = true,
SourceValue = (uint)aValue
};
}
protected override void Push(uint aValue) {
new CPUx86.Push { DestinationValue = aValue };
}
protected override void Push(string aLabelName) {
new CPUx86.Push { DestinationRef = ElementReference.New(aLabelName) };
}
protected override void Call(MethodBase aMethod) {
new CPUx86.Call { DestinationLabel = CPU.MethodInfoLabelGenerator.GenerateLabelName(aMethod) };
}
}
}