diff options
author | Michael Forney <mforney@mforney.org> | 2022-02-12 02:27:50 -0800 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2022-02-17 22:43:12 +0100 |
commit | 4e93eeaa3b63b6ae50954a29662cc3ea6be48b23 (patch) | |
tree | 42f9dd888d3581ca9758afad53116f95ef790083 /tools | |
parent | 8e040d58615e49a63fb50dda5dc695e96a54a7bc (diff) | |
download | roux-4e93eeaa3b63b6ae50954a29662cc3ea6be48b23.tar.gz |
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.
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/test.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/test.sh b/tools/test.sh index c5e5b37..1b23469 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -43,6 +43,30 @@ init() { fi bin="$bin -t arm64" ;; + rv64) + for p in riscv64-linux-musl riscv64-linux-gnu + do + cc="$p-gcc -no-pie" + qemu="qemu-riscv64" + if + $cc -v >/dev/null 2>&1 && + $qemu -version >/dev/null 2>&1 + then + if sysroot=$($cc -print-sysroot) && test -n "$sysroot" + then + qemu="$qemu -L $sysroot" + fi + break + fi + cc= + done + if test -z "$cc" + then + echo "Cannot find riscv64 compiler or qemu." + exit 1 + fi + bin="$bin -t rv64" + ;; "") case `uname` in *Darwin*) |