From 5ac9b506412b11afb993bb52d161efe7666958a5 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Sat, 16 Feb 2019 19:42:34 -0600 Subject: [PATCH] headers/riscv64: Fill out headers needed by buildtools Change-Id: I131a44fbcf7b4f6471cc737cff40bd2966ec9764 --- headers/posix/arch/riscv64/arch_setjmp.h | 13 +++++++++++++ headers/posix/arch/riscv64/signal.h | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 headers/posix/arch/riscv64/arch_setjmp.h create mode 100644 headers/posix/arch/riscv64/signal.h diff --git a/headers/posix/arch/riscv64/arch_setjmp.h b/headers/posix/arch/riscv64/arch_setjmp.h new file mode 100644 index 0000000000..1e12ebcc18 --- /dev/null +++ b/headers/posix/arch/riscv64/arch_setjmp.h @@ -0,0 +1,13 @@ +/* + * Copyright 2018-2019 Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _ARCH_SETJMP_H_ +#define _ARCH_SETJMP_H_ + + +#define _SETJMP_BUF_SZ (1+(2*12)+1) +typedef unsigned long __jmp_buf[_SETJMP_BUF_SZ]; + + +#endif /* _ARCH_SETJMP_H_ */ diff --git a/headers/posix/arch/riscv64/signal.h b/headers/posix/arch/riscv64/signal.h new file mode 100644 index 0000000000..be222f858a --- /dev/null +++ b/headers/posix/arch/riscv64/signal.h @@ -0,0 +1,24 @@ +/* + * Copyright 2018-2019 Haiku, Inc. All Rights Reserved. + * Distributed under the terms of the MIT License. + */ +#ifndef _ARCH_SIGNAL_H_ +#define _ARCH_SIGNAL_H_ + + +/* + * Architecture-specific structure passed to signal handlers + */ + +// TODO: gcc7's RISCV doesn't seem real keen on identifying 32 vs 64 yet. +#if defined(__RISCV64__) || defined(__RISCV__) +struct vregs { + ulong x[31]; + ulong pc; + double f[32]; + char fcsr; +}; +#endif /* defined(__RISCV64__) */ + + +#endif /* _ARCH_SIGNAL_H_ */