From d82c83567da82cdcd41a3ef74aed23b5be39cf18 Mon Sep 17 00:00:00 2001 From: mterwoord_cp <7cd3fd84a0151ea055c2f79e4d2eef9576fe9afesxUZAwxD> Date: Sun, 16 Dec 2007 16:22:14 +0000 Subject: [PATCH] --- source/Indy.IL2CPU.IL.X86/Clt.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/Indy.IL2CPU.IL.X86/Clt.cs b/source/Indy.IL2CPU.IL.X86/Clt.cs index 010647709..d2b26ebd3 100644 --- a/source/Indy.IL2CPU.IL.X86/Clt.cs +++ b/source/Indy.IL2CPU.IL.X86/Clt.cs @@ -17,13 +17,19 @@ namespace Indy.IL2CPU.IL.X86 { } public override void DoAssemble() { Assembler.StackSizes.Pop(); - Assembler.StackSizes.Pop(); + int xSize = Assembler.StackSizes.Pop(); Assembler.StackSizes.Push(4); string BaseLabel = CurInstructionLabel + "__"; string LabelTrue = BaseLabel + "True"; string LabelFalse = BaseLabel + "False"; new CPUx86.Pop(CPUx86.Registers.ECX); + if (xSize > 4) { + new CPUx86.Add("esp", "4"); + } new CPUx86.Pop(CPUx86.Registers.EAX); + if (xSize > 4) { + new CPUx86.Add("esp", "4"); + } new CPUx86.Pushd(CPUx86.Registers.ECX); new CPUx86.Compare(CPUx86.Registers.EAX, CPUx86.Registers.AtESP); new CPUx86.JumpIfLess(LabelTrue);