Esempio n. 1
0
        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");
        }
Esempio n. 2
0
 public abstract void Emit(MethodDefinition md, Instruction c, AssemblyWriter writer);