public override void Emit(MethodDefinition md, Instruction c, AssemblyWriter writer) { int num = 0; if (c.OpCode == OpCodes.Ldarg) { num = (int)c.Operand; } else { num = int.Parse(c.OpCode.Name.Split('.').Last()); } var offset = md.Body.Variables.Count * 4; writer.Mov("eax", $"[ebp+{offset + 4}]"); writer.Push("eax"); }
public abstract void Emit(MethodDefinition md, Instruction c, AssemblyWriter writer);