Skip to content

Commit

Permalink
First step in improving x# and compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
mterwoord committed Jun 11, 2016
1 parent d8d30ec commit 4d6fceb
Show file tree
Hide file tree
Showing 41 changed files with 1,551 additions and 1,074 deletions.
2 changes: 1 addition & 1 deletion Build/Tools/NAsm/LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
NASM is now licensed under the 2-clause BSD license, also known as the
simplified BSD license.

Copyright 1996-2009 the NASM Authors - All rights reserved.
Copyright 1996-2010 the NASM Authors - All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following
Expand Down
Binary file modified Build/Tools/NAsm/nasm.exe
Binary file not shown.
Binary file modified Build/Tools/NAsm/ndisasm.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Build/Tools/NAsm/version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
0.98.38
2.12.01

before updating, test..
4 changes: 4 additions & 0 deletions Tests/Cosmos.TestRunner.Core/Cosmos.TestRunner.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@
<Project>{C801F19C-A9D3-42D5-9A57-9FFDF9B4D05E}</Project>
<Name>Cosmos.IL2CPU.Plugs</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj">
<Project>{239E33A7-F0C3-4801-85CA-4D8F89A31DC0}</Project>
<Name>Cosmos.IL2CPU</Name>
</ProjectReference>
<ProjectReference Include="..\..\source\Cosmos.System.Plugs\Cosmos.System.Plugs.csproj">
<Project>{7C64B97F-516D-4A6D-B9E1-3FE48F561409}</Project>
<Name>Cosmos.System.Plugs</Name>
Expand Down
3 changes: 2 additions & 1 deletion Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Cosmos.Build.MSBuild;
using Cosmos.Core.Plugs;
using Cosmos.Debug.Kernel.Plugs;
using Cosmos.IL2CPU;
using Cosmos.System.Plugs.System;
using IL2CPU;
using Microsoft.Win32;
Expand Down Expand Up @@ -64,7 +65,7 @@ private void RunIL2CPU(string kernelFileName, string outputFile)
throw new Exception("Cannot run multiple kernels with in-process compilation!");
}
// ensure we're using the referenced (= solution) version
Assembler.Assembler.ReadDebugStubFromDisk = false;
CosmosAssembler.ReadDebugStubFromDisk = false;
var xResult = Program.Run(xArguments, OutputHandler.LogMessage, OutputHandler.LogError);
if (xResult != 0)
{
Expand Down
10 changes: 7 additions & 3 deletions Users/Matthijs/DebugCompiler/MyEngine.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.IO;
using Cosmos.Build.Common;
using Cosmos.TestRunner.Core;
using NUnit.Framework;
Expand All @@ -11,19 +12,22 @@ public class RunKernels
[Test]
public void Test([ValueSource(typeof(MySource), nameof(MySource.ProvideData))] Type kernelToRun)
{
Environment.CurrentDirectory = Path.GetDirectoryName(typeof(RunKernels).Assembly.Location);

var xEngine = new Engine();
// Sets the time before an error is registered. For example if set to 60 then if a kernel runs for more than 60 seconds then
// that kernel will be marked as a failiure and terminated
xEngine.AllowedSecondsInKernel = 1800;
xEngine.AllowedSecondsInKernel = 30;

// If you want to test only specific platforms, add them to the list, like next line. By default, all platforms are run.
xEngine.RunTargets.Add(RunTargetEnum.Bochs);

// If you're working on the compiler (or other lower parts), you can choose to run the compiler in process
// one thing to keep in mind though, is that this only works with 1 kernel at a time!
xEngine.RunIL2CPUInProcess = false;
xEngine.RunIL2CPUInProcess = true;
xEngine.TraceAssembliesLevel = TraceAssemblies.User;
xEngine.EnableStackCorruptionChecks = true;

xEngine.EnableStackCorruptionChecks = false;
xEngine.StackCorruptionChecksLevel = StackCorruptionDetectionLevel.AllInstructions;

// Select kernels to be tested by adding them to the engine
Expand Down
Loading

0 comments on commit 4d6fceb

Please sign in to comment.