Skip to content
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

X86_64 Support #27

Open
1 of 4 tasks
JL2210 opened this issue Feb 7, 2019 · 6 comments
Open
1 of 4 tasks

X86_64 Support #27

JL2210 opened this issue Feb 7, 2019 · 6 comments

Comments

@JL2210
Copy link
Contributor

JL2210 commented Feb 7, 2019

This is an issue to track the progress for java_grinder on x86_64

  • registers
  • data types/sizes
  • code generation
  • enabling support

Please edit as progress continues, and feel free to add more goals.

@JL2210
Copy link
Contributor Author

JL2210 commented Feb 9, 2019

@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.

@mikeakohn
Copy link
Owner

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.

@mikeakohn
Copy link
Owner

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.

@JL2210
Copy link
Contributor Author

JL2210 commented Feb 9, 2019

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.

@mikeakohn
Copy link
Owner

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.

@JL2210
Copy link
Contributor Author

JL2210 commented Feb 9, 2019

Let me attach a log as an example:

java_grinder.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants