Open am11 opened 2 years ago
cc @alexrp, @vargaz
We need an arch-riscv
label.
cc @lambdageek @directhex
Sorry @alexp, I meant to copy @alexrp :slightly_smiling_face:
there are ~50 functions that need implementation
You're basically looking at doing a Mini JIT port. What is implemented is just enough to make the backend compile, along with some supporting functionality like codegen macros and hardware feature detection. All the hard stuff hasn't actually been done yet. It's a substantial undertaking that, realistically, would probably require a company willing to fund full-time development.
If you just want something semi-functional but not fast, running with the interpreter might be an option.
Would an interpreted RISC-V implementation be accepted upstream @alexrp?
I have no say on such matters. All I can tell you is that Mono's interpreter is fully productized and supported, while CoreCLR's is just used for bringup on new platforms and isn't really meant to be fully compliant/usable. So I would expect that RISC-V patches for Mono's interpreter are welcome at least.
To make
dotnet(1)
work with-p:RuntimeFlavor=mono
on linux-riscv64 desktop, there are ~50 functions that need implementation in the following files:We can skip the
_dyn_
APIs:git grep mono_arch_.*dyn ':/src/mono/*riscv*'
.To cross-compile:
Then copy
artifacts/bin
to riscv64 VM (e.g. this setup: https://gist.github.com/marrrk/b1014564826449dc23cecb3b8a01a5f2) and run some assembly to see the crash due to missing implementation: