diff --git a/cmake b/cmake index 9416f297..ee21f7ac 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 9416f297430bc358eea48f8cf65aa0d602029629 +Subproject commit ee21f7ac0c42cfb1bdbd7ac0df75a83dea967864 diff --git a/src/c4/cpu.hpp b/src/c4/cpu.hpp index 32d7ba04..d3016f9c 100644 --- a/src/c4/cpu.hpp +++ b/src/c4/cpu.hpp @@ -103,6 +103,16 @@ # define C4_WORDSIZE 8 # define C4_BYTE_ORDER _C4EB +#elif defined(__riscv) + #if __riscv_xlen == 64 + #define C4_CPU_RISCV64 + #define C4_WORDSIZE 8 + #else + #define C4_CPU_RISCV32 + #define C4_WORDSIZE 4 + #endif + #define C4_BYTE_ORDER _C4EL + #elif defined(__EMSCRIPTEN__) # define C4_BYTE_ORDER _C4EL # define C4_WORDSIZE 4