mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 22:12:25 +00:00
22 lines
No EOL
671 B
C#
22 lines
No EOL
671 B
C#
using System;
|
|
using System.IO;
|
|
using Mono.Cecil;
|
|
using Mono.Cecil.Cil;
|
|
using CPUx86 = Indy.IL2CPU.Assembler.X86;
|
|
|
|
namespace Indy.IL2CPU.IL.X86 {
|
|
[OpCode(Code.Brfalse)]
|
|
public class Brfalse: Op {
|
|
public readonly string TargetLabel;
|
|
public Brfalse(Mono.Cecil.Cil.Instruction aInstruction, MethodInformation aMethodInfo)
|
|
: base(aInstruction, aMethodInfo) {
|
|
TargetLabel = GetInstructionLabel((Instruction)aInstruction.Operand);
|
|
}
|
|
public override void DoAssemble() {
|
|
new CPUx86.Popd(CPUx86.Registers.EAX);
|
|
new CPUx86.Compare(CPUx86.Registers.EAX, "0");
|
|
new CPUx86.JumpIfEquals(TargetLabel);
|
|
Assembler.StackSizes.Pop();
|
|
}
|
|
}
|
|
} |