-
Notifications
You must be signed in to change notification settings - Fork 824
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
Anyone else working with the RISC-V support? #2756
Comments
This looks great! I don't think it would take too much effort to get the universal engine working too, I think you just need to implement support for RISC-V relocations. Apart from the issues with the LLVM API, I think this looks great! |
Thanks! |
For starters I just implemented R_RISCV_CALL_PLT relocation, and fizzbuzz runs with universal engine. But more complex program like coremark.wasm, doesn't works.
|
This seems to be constants generated by LLVM, which are placed in the By the way, make sure that linker relaxation is disabled since we are unlikely to support this in Wasmer. |
I see, so I guess that means LLVM doesn't generate code like this on x86_64 and aarch64. |
I found it's better to match architecture in addition to relocation kind and size here. For example R_X86_64_PC64 and R_RISCV_PCREL_LO12_I, both are wasmer/lib/compiler-llvm/src/object_file.rs Line 166 in 67be3ea
|
That sounds like a good way to match relocations. Let us know once the PR is ready to be reviewed :) |
Thanks, I created the pull request #2783 that has just relocation matching changes described above. |
I'm making progress slowly...
https://github.com/tnayuki/wasmer/commits/risc-v |
Many tests now pass on my HiFIve Unmatched! https://github.com/tnayuki/wasmer/commits/risc-v |
I created a PR. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
not stale |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Feel free to reopen the issue if it has been closed by mistake. |
Feel free to reopen the issue if it has been closed by mistake. |
I managed to get wasmer starting to work on my HiFive Unmatched RISC-V board.
It can now runs FizzBuzz with LLVM compiler and Dylib engine.
But I think it's not yet suitable to make a pull request due to some reasons.
I think we should add more RISC-V support to inkwell, llvm-sys and maybe also LLVM C API.
Here is my change:
https://github.com/tnayuki/wasmer/commits/risc-v
If anyone else working with the RISC-V support, I would like to hear a better approach.
The text was updated successfully, but these errors were encountered: