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

Erlang RISC-V Architecture JIT Support #7498

Open
yskelg opened this issue Jul 14, 2023 · 9 comments
Open

Erlang RISC-V Architecture JIT Support #7498

yskelg opened this issue Jul 14, 2023 · 9 comments
Labels
enhancement team:PO Assigned to OTP team PO

Comments

@yskelg
Copy link

yskelg commented Jul 14, 2023

We can develop and test RISC-V support with official Ubuntu spported Vision Five 2 RISC-V Board.

If we add architecture support for RISC-V, First of all, I think asmjit and
beam module support needed. Is that good starting point for RISC-V support?

If we need new architecture support, Can I ask is there a guide we can refer to?

@jhogberg jhogberg added the team:PO Assigned to OTP team PO label Jul 14, 2023
@jhogberg
Copy link
Contributor

jhogberg commented Jul 14, 2023

RISC-V should already work out of the box, just not with the JIT. Have you had any issues building and running Erlang?

@yskelg
Copy link
Author

yskelg commented Jul 14, 2023

@jhogberg thank you for your response. I'll build and test it on my ubuntu environment on my Vision Five 2 board to see if it works without JIT well. :)
Are there any plans to support JIT for RISC-V like arm, arm64 or x86, x86_64 architecture?

@yskelg
Copy link
Author

yskelg commented Jul 14, 2023

@yskelg
Copy link
Author

yskelg commented Nov 12, 2023

I tested erlang on real RISC-V board. It works fine!

starfive:~$ uname -ra
Linux starfive 5.15.0-starfive #1 SMP Mon Dec 19 07:56:37 EST 2022 riscv64 GNU/Linux
starfive:~$ erlang/bin/erl -noshell -eval 'io:fwrite("Hello, World!\n"), init:stop().'
Hello, World!

@yskelg yskelg changed the title Erlang RISC-V Architecture Support. Erlang RISC-V Architecture JIT Support. Nov 12, 2023
@yskelg
Copy link
Author

yskelg commented Nov 12, 2023

@jhogberg Are there any plans to support JIT for RISC-V?

@garazdawi
Copy link
Contributor

There are currently no plans to add RISC-V support for the JIT.

@adrianbrink
Copy link

What are the tradeoff of not having JIT support for RISC-V?

@garazdawi
Copy link
Contributor

What are the tradeoff of not having JIT support for RISC-V?

Adding a new JIT backend is a lot of work and each backend adds to our maintainance burden as there is very little code that can be shared between the backends. So for a new backend to be added there needs to be a very strong usecase. Initially we had not planned to have any more than x86_64, but then apple went and changed the game by making aarch64 great again.

@yskelg yskelg changed the title Erlang RISC-V Architecture JIT Support. Erlang RISC-V Architecture JIT Support Dec 7, 2023
@xorrvin xorrvin mentioned this issue Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:PO Assigned to OTP team PO
Projects
None yet
Development

No branches or pull requests

4 participants