add rv64 backend

It is mostly complete, but still has a few ABI bugs when passing
floats in structs, or when structs are passed partly in register,
and partly on stack.
This commit is contained in:
Michael Forney 2022-02-12 02:27:50 -08:00 committed by Quentin Carbonneaux
parent 8e040d5861
commit 4e93eeaa3b
13 changed files with 1656 additions and 128 deletions

20
doc/rv64.txt Normal file
View file

@ -0,0 +1,20 @@
=========
RISC-V 64
=========
- Known issues
--------------
ABI with structs containing floats is not yet supported.
- Possible improvements
-----------------------
rv64_isel() could turn compare used only with jnz into b{lt,ge}[u].
- Helpful links
---------------
RISC-V spec: https://github.com/riscv/riscv-isa-manual/releases/latest/download/riscv-spec.pdf
ASM manual: https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md
psABI: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc