From 4254e407294b211f3399da2ee131b45fe9f4ac80 Mon Sep 17 00:00:00 2001 From: Romain Dolbeau Date: Wed, 6 Nov 2019 19:56:09 +0100 Subject: Preliminary support for RV64G This adds basic support for RISC-V, specifically RV64G. Reviewed-by: Brian Behlendorf Signed-off-by: Romain Dolbeau Closes #9540 --- lib/libspl/include/sys/isa_defs.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'lib/libspl/include') diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h index 7a90e077e..18a41fef9 100644 --- a/lib/libspl/include/sys/isa_defs.h +++ b/lib/libspl/include/sys/isa_defs.h @@ -192,10 +192,29 @@ extern "C" { #define _SUNOS_VTOC_16 +/* + * RISC-V arch specific defines + * only RV64G (including atomic) LP64 is supported yetxi + */ +#elif defined(__riscv) && defined(_LP64) && _LP64 && \ + defined(__riscv_atomic) && __riscv_atomic + +#ifndef __riscv__ +#define __riscv__ +#endif + +#ifndef __rv64g__ +#define __rv64g__ +#endif + +#define _LITTLE_ENDIAN + +#define _SUNOS_VTOC_16 + #else /* * Currently supported: - * x86_64, i386, arm, powerpc, s390, sparc, and mips + * x86_64, i386, arm, powerpc, s390, sparc, mips, and RV64G */ #error "Unsupported ISA type" #endif -- cgit v1.2.3