https://github.com/riscv/riscv-c-api-doc/blob/master/riscv-c-api.md#preprocessor-definitions diff -upr a/LibSupport.h b/LibSupport.h --- a/LibSupport.h 2021-01-15 22:45:18.000000000 +0100 +++ b/LibSupport.h 2021-09-01 20:06:16.118220400 +0200 @@ -78,6 +78,8 @@ || defined(_M_ARM) || defined(__arm__) || defined(__thumb__) \ || defined(__powerpc__) || defined(__PPC__) # define RADIX_BITS 32 +# elif defined(__riscv) +# define RADIX_BITS __riscv_xlen # else # error Unable to determine RADIX_BITS from compiler environment # endif