java_grinder
java_grinder copied to clipboard
X86_64 Support
This is an issue to track the progress for java_grinder on x86_64
- [x] registers
- [ ] data types/sizes
- [ ] code generation
- [ ] enabling support
Please edit as progress continues, and feel free to add more goals.
@mikeakohn How do I use this? It seems like it's not quite fully implemented yet, even on x86. Example: I'm trying to compile a simple Hello, World!
program and it's giving me an error about println_X
when I'm using println
.
Note: I'm a C guy. I'm not very experienced in Java.
The API's that are in standard Java aren't implemented. Java Grinder pretty much just takes the Java assembly instructions and generates assembly code for other CPUs. After that, different APIs can be written depending on the platform.. like C64 has its own API for manipulating its hardware.
In the samples/x86 and samples/x86_64 directories I put samples that work with x86 and almost work with x86_64. It's basically C calling the generated Java functions.
And actually, the Java instructions aren't complete either. The core of Java Grinder has implementations just for the instructions that were needed for the things I (and others) needed.
Would it be possible to use something like GNU Classpath to implement this? I know it's deprecated, but you could register the latest version of their Savannah Git repository as a submodule.
I had to look that up... seems like it could be possible. It's kind of out of the scope of what I was thinking Java Grinder would be. I started it as more out of a learning experience.. plus I thought it would be neat to have the ability to write code in Java on MSP430 or other systems that most people would have never thought about using Java for. For programming standard Java code, there are already JVM's with really fast JITs that can use all the standard Java APIs.