summaryrefslogtreecommitdiffstats
path: root/unwind.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-05-10 07:16:42 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-05-10 07:16:42 -0700
commit266653039eb5a6da5cc69ed72bd8792bf8befeca (patch)
treeb703cbf0c7a4ae1eda86c1e8406fc774d5b1d034 /unwind.h
parent4f616b1d8f97bf141d96dfdf225d09ef1172271d (diff)
downloadtxr-266653039eb5a6da5cc69ed72bd8792bf8befeca.tar.gz
txr-266653039eb5a6da5cc69ed72bd8792bf8befeca.tar.bz2
txr-266653039eb5a6da5cc69ed72bd8792bf8befeca.zip
Support RISC-V: conditionally.
Everything compiles, and most tests pass. Failing test are: - tests/014/dgram-stream.tl: - tests/017/glob-carray.tl: - tests/017/qsort.tl: The datagram test is not able to bind a UDP socket to a port. On the gcc402 machine of the GCC Compile Farm, attempts bind a UDP socket to any of the ports 1024-65535 all fail with errno 99 (EADDRNOTAVAIL). The FFI test cases are segfaulting. The qosrt.tl case has the problem in the test cases which abort the callback with a return-from. * unwind.h (struct jmp): Define for RISC-V. * jmp.S (DEFUN): Define macro for RISC-V. (jmp_save, jmp_restore): Define for RISC-V.
Diffstat (limited to 'unwind.h')
-rw-r--r--unwind.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/unwind.h b/unwind.h
index 923981ac..ea9bd9a6 100644
--- a/unwind.h
+++ b/unwind.h
@@ -159,6 +159,39 @@ struct jmp {
unsigned long ra; /* $31 */
};
+#elif __riscv
+
+struct jmp {
+ unsigned long ra; /* x1 */
+ unsigned long sp; /* x2 */
+ unsigned long fp; /* x8 */
+ unsigned long s1; /* x9 */
+ unsigned long s2; /* x18 */
+ unsigned long s3; /* x19 */
+ unsigned long s4; /* x20 */
+ unsigned long s5; /* x21 */
+ unsigned long s6; /* x22 */
+ unsigned long s7; /* x23 */
+ unsigned long s8; /* x24 */
+ unsigned long s9; /* x25 */
+ unsigned long s10; /* x26 */
+ unsigned long s11; /* x27 */
+#if 0 && !__riscv_float_abi_soft
+ double fs0; /* f8 */
+ double fs1; /* f9 */
+ double fs2; /* f18 */
+ double fs3; /* f19 */
+ double fs4; /* f20 */
+ double fs5; /* f21 */
+ double fs6; /* f22 */
+ double fs7; /* f23 */
+ double fs8; /* f24 */
+ double fs9; /* f25 */
+ double fs10; /* f26 */
+ double fs11; /* f27 */
+#endif
+};
+
#else
#error port me!
#endif