mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-29 20:30:44 +00:00
23 lines
No EOL
691 B
C#
23 lines
No EOL
691 B
C#
using System;
|
|
using System.IO;
|
|
using Mono.Cecil;
|
|
using Mono.Cecil.Cil;
|
|
using CPU = Indy.IL2CPU.Assembler.X86;
|
|
|
|
namespace Indy.IL2CPU.IL.X86 {
|
|
[OpCode(Code.Stsfld)]
|
|
public class Stsfld: Op {
|
|
private string mDataName;
|
|
|
|
public Stsfld(Mono.Cecil.Cil.Instruction aInstruction, MethodInformation aMethodInfo)
|
|
: base(aInstruction, aMethodInfo) {
|
|
FieldReference xField = (FieldReference)aInstruction.Operand;
|
|
DoQueueStaticField(xField.DeclaringType.Module.Assembly.Name.FullName, xField.DeclaringType.FullName, xField.Name, out mDataName);
|
|
}
|
|
|
|
public override void DoAssemble() {
|
|
Pop("eax");
|
|
Move(Assembler, "dword [" + mDataName + "]", "eax");
|
|
}
|
|
}
|
|
} |