-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace the compiler from WDK7.1 to EWDK10-2004. The code will be compliant to C99 instead of Microsoft C98. Add spectre-mitigation by compiler. Add "Release/Free" compilation preset. Add cleanup script.
- Loading branch information
Showing
9 changed files
with
99 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,6 @@ | |
modules.order | ||
Module.symvers | ||
Mkfile.old | ||
dkms.conf | ||
dkms.conf | ||
|
||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
@echo off | ||
|
||
title Compiling mipsivm, Checked Build, 64-Bit Windows (AMD64 Architecture) | ||
title Preparing Compilation of Project mipsivm | ||
echo Project: mipsivm | ||
echo Platform: Universal | ||
echo Preset: Preparation | ||
pause | ||
|
||
mkdir .\bin | ||
mkdir .\bin\compchk_win7x64 | ||
mkdir .\bin\compchk_win7x64\Intermediate | ||
mkdir .\bin\compchk_win10x64 | ||
mkdir .\bin\compchk_win10x64\Intermediate | ||
mkdir .\bin\compfre_win10x64 | ||
mkdir .\bin\compfre_win10x64\Intermediate | ||
|
||
echo Completed! | ||
pause. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@echo off | ||
|
||
title mipsivm Cleanup | ||
echo Project: mipsivm | ||
echo Platform: Universal (Non-Binary Build) | ||
echo Preset: Cleanup | ||
echo Powered by zero.tangptr@gmail.com | ||
echo Warning: All compiled binaries, including intermediate files, will be deleted! | ||
pause. | ||
|
||
echo Performing cleanup... | ||
del .\bin /q /s | ||
|
||
echo Cleanup Completed! | ||
pause. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@echo off | ||
set ddkpath=T:\Program Files\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110 | ||
set path=%ddkpath%\bin\Hostx64\x64;T:\Program Files\Windows Kits\10\bin\10.0.19041.0\x64;%path% | ||
set incpath=T:\Program Files\Windows Kits\10\Include\10.0.19041.0 | ||
set libpath=T:\Program Files\Windows Kits\10\Lib\10.0.19041.0 | ||
set binpath=.\bin\compchk_win10x64 | ||
set objpath=.\bin\compchk_win10x64\Intermediate | ||
|
||
title Compiling mipsivm, Checked Build, 64-Bit Windows (AMD64 Architecture) | ||
echo Project: mipsivm | ||
echo Platform: 64-Bit Windows | ||
echo Preset: Debug/Checked Build | ||
pause | ||
|
||
echo ============Start Compiling============ | ||
cl .\src\xpf\windows\system.c /I"%incpath%\shared" /I"%incpath%\ucrt" /I"%incpath%\um" /I"%ddkpath%\include" /I".\src\include" /Zi /nologo /W3 /WX /Od /D"_MBCS" /D"_WIN64" /D"_M_AMD64" /D"_AMD64_" /D"_CRT_SECURE_NO_WARNINGS" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\system.cod" /Fo"%objpath%\system.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\entry.c /I"%incpath%\shared" /I"%incpath%\ucrt" /I"%incpath%\um" /I"%ddkpath%\include" /I".\src\include" /Zi /nologo /W3 /WX /Od /D"_msvc" /D"_amd64" /D"_CRT_SECURE_NO_WARNINGS" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\entry.cod" /Fo"%objpath%\entry.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\vcpu.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /Od /D"_msvc" /D"_amd64" /D"_mips_hvm" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\vcpu.cod" /Fo"%objpath%\vcpu.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\mars.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /Od /D"_msvc" /D"_amd64" /D"_mips_hvm_mars" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\mars.cod" /Fo"%objpath%\mars.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\sim-r.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /Od /D"_msvc" /D"_amd64" /D"_mips_simr" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\sim-r.cod" /Fo"%objpath%\sim-r.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\sim-i.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /Od /D"_msvc" /D"_amd64" /D"_mips_simi" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\sim-i.cod" /Fo"%objpath%\sim-i.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\sim-j.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /Od /D"_msvc" /D"_amd64" /D"_mips_simj" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\sim-j.cod" /Fo"%objpath%\sim-j.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
echo ============Start Linking============ | ||
link "%objpath%\*.obj" /LIBPATH:"%libpath%\um\x64" /LIBPATH:"%libpath%\ucrt\x64" /LIBPATH:"%ddkpath%\lib\x64" /NOLOGO /DEBUG /PDB:"%objpath%\mipsivm.pdb" /INCREMENTAL:NO /OUT:"%binpath%\mipsivm.exe" /SUBSYSTEM:CONSOLE /Machine:X64 /ERRORREPORT:QUEUE | ||
|
||
pause |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@echo off | ||
set ddkpath=T:\Program Files\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110 | ||
set path=%ddkpath%\bin\Hostx64\x64;T:\Program Files\Windows Kits\10\bin\10.0.19041.0\x64;%path% | ||
set incpath=T:\Program Files\Windows Kits\10\Include\10.0.19041.0 | ||
set libpath=T:\Program Files\Windows Kits\10\Lib\10.0.19041.0 | ||
set binpath=.\bin\compfre_win10x64 | ||
set objpath=.\bin\compfre_win10x64\Intermediate | ||
|
||
title Compiling mipsivm, Free Build, 64-Bit Windows (AMD64 Architecture) | ||
echo Project: mipsivm | ||
echo Platform: 64-Bit Windows | ||
echo Preset: Release/Free Build | ||
pause | ||
|
||
echo ============Start Compiling============ | ||
cl .\src\xpf\windows\system.c /I"%incpath%\shared" /I"%incpath%\ucrt" /I"%incpath%\um" /I"%ddkpath%\include" /I".\src\include" /Zi /nologo /W3 /WX /O2 /D"_MBCS" /D"_WIN64" /D"_M_AMD64" /D"_AMD64_" /D"_CRT_SECURE_NO_WARNINGS" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\system.cod" /Fo"%objpath%\system.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\entry.c /I"%incpath%\shared" /I"%incpath%\ucrt" /I"%incpath%\um" /I"%ddkpath%\include" /I".\src\include" /Zi /nologo /W3 /WX /O2 /D"_msvc" /D"_amd64" /D"_CRT_SECURE_NO_WARNINGS" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\entry.cod" /Fo"%objpath%\entry.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\vcpu.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /O2 /D"_msvc" /D"_amd64" /D"_mips_hvm" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\vcpu.cod" /Fo"%objpath%\vcpu.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\mars.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /O2 /D"_msvc" /D"_amd64" /D"_mips_hvm_mars" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\mars.cod" /Fo"%objpath%\mars.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\sim-r.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /O2 /D"_msvc" /D"_amd64" /D"_mips_simr" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\sim-r.cod" /Fo"%objpath%\sim-r.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\sim-i.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /O2 /D"_msvc" /D"_amd64" /D"_mips_simi" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\sim-i.cod" /Fo"%objpath%\sim-i.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
cl .\src\sim-j.c /I".\src\include" /Zi /nologo /W3 /WX /Oi /O2 /D"_msvc" /D"_amd64" /D"_mips_simj" /Zc:wchar_t /Zc:forScope /FAcs /Fa"%objpath%\sim-j.cod" /Fo"%objpath%\sim-j.obj" /Fd"%objpath%\vc140.pdb" /Qspectre /GS- /Gd /TC /c /errorReport:queue | ||
|
||
echo ============Start Linking============ | ||
link "%objpath%\*.obj" /LIBPATH:"%libpath%\um\x64" /LIBPATH:"%libpath%\ucrt\x64" /LIBPATH:"%ddkpath%\lib\x64" /NOLOGO /DEBUG /PDB:"%objpath%\mipsivm.pdb" /INCREMENTAL:NO /OUT:"%binpath%\mipsivm.exe" /SUBSYSTEM:CONSOLE /Machine:X64 /ERRORREPORT:QUEUE | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters