Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[impl] add riscv cpu support #69

Merged
merged 2 commits into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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