Skip to content

Commit

Permalink
[impl] add riscv cpu support
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeonacid committed Feb 12, 2022
1 parent 63ed9a0 commit ed9bf87
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/c4/cpu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed9bf87

Please sign in to comment.