diff --git a/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs b/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs index ca54385ba..a4a0ea786 100644 --- a/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs +++ b/Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs @@ -19,11 +19,11 @@ namespace Cosmos.TestRunner.Core // if you're working on the compiler (or other lower parts), you can choose to run the compiler in process // 1 thing to keep in mind though, is that this only works with 1 kernel at a time! - engine.RunIL2CPUInProcess = true; + engine.RunIL2CPUInProcess = false; - //engine.AddKernel(typeof(Cosmos.Compiler.Tests.SimpleWriteLine.Kernel.Kernel).Assembly.Location); + engine.AddKernel(typeof(Cosmos.Compiler.Tests.SimpleWriteLine.Kernel.Kernel).Assembly.Location); engine.AddKernel(typeof(SimpleStructsAndArraysTest.Kernel).Assembly.Location); - //engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location); + engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location); // known bugs, therefor disabled for now: diff --git a/source/Cosmos.IL2CPU/IL/Ldfld.cs b/source/Cosmos.IL2CPU/IL/Ldfld.cs index 66c592bbe..1ce55695f 100644 --- a/source/Cosmos.IL2CPU/IL/Ldfld.cs +++ b/source/Cosmos.IL2CPU/IL/Ldfld.cs @@ -87,20 +87,20 @@ namespace Cosmos.IL2CPU.X86.IL switch (xFieldInfo.Size) { case 1: - new CPUx86.Mov { DestinationReg = CPUx86.Registers.AL, SourceReg = CPUx86.Registers.ESP, SourceIsIndirect = true }; + new CPUx86.Mov { DestinationReg = CPUx86.Registers.AL, SourceReg = CPUx86.Registers.ESP, SourceDisplacement=xOffset, SourceIsIndirect = true }; break; case 2: - new CPUx86.Mov { DestinationReg = CPUx86.Registers.AX, SourceReg = CPUx86.Registers.ESP, SourceIsIndirect = true }; + new CPUx86.Mov { DestinationReg = CPUx86.Registers.AX, SourceReg = CPUx86.Registers.ESP, SourceDisplacement = xOffset, SourceIsIndirect = true }; break; case 3: //For Release - new CPUx86.Mov { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.ESP, SourceIsIndirect = true }; + new CPUx86.Mov { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.ESP, SourceDisplacement = xOffset, SourceIsIndirect = true }; new CPUx86.ShiftRight { DestinationReg = CPUx86.Registers.EAX, SourceValue = 8 }; break; case 4: - new CPUx86.Mov { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.ESP, SourceIsIndirect = true }; + new CPUx86.Mov { DestinationReg = CPUx86.Registers.EAX, SourceReg = CPUx86.Registers.ESP, SourceDisplacement = xOffset, SourceIsIndirect = true }; break; default: