mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
25 lines
No EOL
649 B
C#
25 lines
No EOL
649 B
C#
using System;
|
|
using System.Linq;
|
|
using Mono.Cecil;
|
|
using Mono.Cecil.Cil;
|
|
using CPU = Indy.IL2CPU.Assembler;
|
|
|
|
namespace Indy.IL2CPU.IL.X86 {
|
|
[OpCode(Code.Ldftn)]
|
|
public class Ldftn: Op {
|
|
private string mFunctionLabel;
|
|
|
|
public Ldftn(Instruction aInstruction, MethodInformation aMethodInfo)
|
|
: base(aInstruction, aMethodInfo) {
|
|
MethodReference xMethodRef = aInstruction.Operand as MethodReference;
|
|
if (xMethodRef == null) {
|
|
throw new Exception("Unable to determine Method!");
|
|
}
|
|
mFunctionLabel = new CPU.Label(xMethodRef).Name;
|
|
}
|
|
|
|
public override void DoAssemble() {
|
|
Pushd(mFunctionLabel);
|
|
}
|
|
}
|
|
} |