-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Windows support to the native part of MaxineVM #21
base: develop
Are you sure you want to change the base?
Conversation
…relies exclusively on existing native Windows Libraries, no dependency required)
…e (code relies exclusively on existing native Windows Libraries, no dependency required)" This reverts commit 8d7ca09.
Added code for the creation of the following shared libraries/executables on Windows: jvm.dll (substrate), javatest.dll, hosted.dll, maxvm.exe (launch) -Only tele.dll excluded Code depends entirely on native Windows DLLs- no other dependencies required to compile and run) The only thing left unimplemented (besides Tele) is the sending of signals to different threds/processes (ie. kill() ) as Windows do not support that functionality. Windows Signals can only be raised from within the same process that receives them (like Exceptions).
This reverts commit 1f966b0.
Added code for the creation of the following executables and shared libraries on Windows: jvm.dll (substrate), javatest.dll, maxvm.exe (launch), hosted.dll -Only tele.dll excluded The code depends entirely on native Windows Libraries available in any Windows OS after (including) Windows Vista. No additional dependency (like .Cygwin, pthread libraries etc) is required to compile and run it. Only thing left unimplemented (besides Tele) is the ability to send signals to different threads/ procs (ie. kill () ) as Windows do not support such functionality. Windows signals can only be raised from within the same process that receives them (like Exceptions). One could probably emulate the functionality of UNIX signals using something like Windows message posting but that requires each thread to explicitly receive a message using function like GetMessage(). For now, it is left unimplemented.
Hi Mihali, thanks for the PR. |
Hi. Unfortunately, I have still some issues with boot image creation on Windows so i cannot completely test Maxine VM. However, the code added is tested using my own tests and appears to work correctly. Also, maxvm.exe correctly loads maxine function from jvm.dll and attempts to find the boot image in the same directory. I was prompted by @zakkak to make this PR in case someone wants to continue the development for Windows. |
Great, thanks Mihali. |
Fixed com.sun.max.config.jdk.Package constructor. We avoid resetting any field in java.lang.UNIXProcess when running on Windows. Attempting to load java.lang.UNIX on Windows caused NoClassDefFoundError when we tried to load com.sun.max.config.jdk.Package class during image generation. As a result problematic classed were not added to Compilation Blacklist and many unexplainable compilation errors were emerging
-makefile omits Tele build on Windows -launch.mk uses "maxvm.exe" instead of bare "maxvm" (some cp (copy) implementations for Windows need the extension while others do not). -javatest.mk uses more source files for javatest.dll on Windows because Windows do not allow undefined references in DLLs. However, if not on Windows, we use the default source files -platform.mk we assign OS = windows when uname returns not only "WindowsNT" but if it also includes "MINGW" inside it.
…page size + better reading of image file on Windows
Hi. Regards, |
Added Windows code to com.oracle.max.vm.native while the already existing code for other OSes remains functional. You can check the description of my last commit for additional info. Also, all the additions made regard x86_64 (amd64) ISA only.