Skip to content

Commit

Permalink
Merge pull request #69 from Xeonacid/patch-1
Browse files Browse the repository at this point in the history
[impl] add riscv cpu support
  • Loading branch information
biojppm committed Feb 12, 2022
2 parents 63ed9a0 + 3f24366 commit 79c15b0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 1 files
+10 −0 TargetArchitecture.cmake
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 79c15b0

Please sign in to comment.