27 lines
734 B
Diff
27 lines
734 B
Diff
diff --git a/ext/posh.h b/ext/posh.h
|
|
index 9c0e012..b122d58 100755
|
|
--- a/ext/posh.h
|
|
+++ b/ext/posh.h
|
|
@@ -524,6 +524,21 @@ Metrowerks:
|
|
# define POSH_CPU_STRING "S/390"
|
|
#endif
|
|
|
|
+#if defined __riscv && defined __riscv_xlen
|
|
+# if __riscv_xlen == 32
|
|
+# define POSH_CPU_RISCV32 1
|
|
+# define POSH_CPU_STRING "RISCV32"
|
|
+# elif __riscv_xlen == 64
|
|
+# define POSH_CPU_RISCV64 1
|
|
+# define POSH_CPU_STRING "RISCV64"
|
|
+# elif __riscv_xlen == 128
|
|
+# define POSH_CPU_RISCV128 1
|
|
+# define POSH_CPU_STRING "RISCV128"
|
|
+# else
|
|
+# error "Unknown XLEN size!"
|
|
+# endif
|
|
+#endif
|
|
+
|
|
#if !defined POSH_CPU_STRING
|
|
# error POSH cannot determine target CPU
|
|
# define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */
|