Skip to content

Commit

Permalink
Add riscv64 support (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
hack3ric authored Jul 2, 2024
1 parent 90939ab commit dd7cb94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/std/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ static value sys_is64() {
<li>[x86]</li>
<li>[arm64]</li>
<li>[arm]</li>
<li>[riscv64]</li>
</ul>
</doc>
**/
Expand All @@ -254,6 +255,8 @@ static value sys_cpu_arch() {
return alloc_string("arm64");
#elif defined(__arm__) || defined(_M_ARM)
return alloc_string("arm");
#elif (defined(__riscv) && (__riscv_xlen == 64)) || defined(_M_RISCV64)
return alloc_string("riscv64");
#else
#error Unknown CPU architecture
#endif
Expand Down

0 comments on commit dd7cb94

Please sign in to comment.