[RISCV] Build fixes and simple exception handling (#40142)
Hello Mono friends,
here are some build fixes to make the RISC-V port compile again. Also I added some minimal exception handling stuff to make most of the mini regression test suites passing in the interpreter:
```console
$ for i in mono/mini/{basic.exe,basic-float.exe,basic-long.exe,basic-calls.exe,objects.exe,arrays.exe,exceptions.exe,iltests.exe,devirtualization.exe,generics.exe,basic-vectors.exe,ratests.exe}; do \
MONO_PATH=../managed-libs/./mcs/class/lib/net_4_x-linux/ \
qemu-riscv64 ./mono/mini/mono-sgen --config data/config --regression --interp $i;
done
```
output here: https://gist.github.com/lewurm/
d7e54b47930126e6bae77b9a4eee1d40
While this is cool, keep in mind this only works because `--regression` doesn't pull in any native transitions. For this we essentially need a working JIT and implement some trampolines. Alas I ran out of time for my hackweek project to get it in any useful state, so I didn't include it in this PR. My WIP branch is here: https://github.com/lewurm/mono/commits/riscv-wip
I also ran into an annoying qemu bug which I reported here: https://github.com/riscv/riscv-binutils-gdb/issues/223 / https://bugs.launchpad.net/qemu/+bug/1889411 Hopefully this will be fixed before I touch it next time and/or I have real hardware at this point 😄
/cc @alexrp
Co-authored-by: lewurm <lewurm@users.noreply.github.com>