1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-19 07:04:48 +00:00

Add :riscv32 and :riscv32 values for os/arch.

This commit is contained in:
Calvin Rose 2023-01-27 11:23:57 -06:00
parent 6ae3bdb25c
commit 9106228787

View File

@ -162,6 +162,8 @@ JANET_CORE_FN(os_arch,
"* :x64\n\n" "* :x64\n\n"
"* :arm\n\n" "* :arm\n\n"
"* :aarch64\n\n" "* :aarch64\n\n"
"* :riscv32\n\n"
"* :riscv64\n\n"
"* :sparc\n\n" "* :sparc\n\n"
"* :wasm\n\n" "* :wasm\n\n"
"* :unknown\n") { "* :unknown\n") {
@ -180,6 +182,10 @@ JANET_CORE_FN(os_arch,
return janet_ckeywordv("aarch64"); return janet_ckeywordv("aarch64");
#elif defined(_M_ARM) || defined(__arm__) #elif defined(_M_ARM) || defined(__arm__)
return janet_ckeywordv("arm"); return janet_ckeywordv("arm");
#elif (defined(__riscv) && (__riscv_xlen == 64))
return janet_ckeywordv("riscv64");
#elif (defined(__riscv) && (__riscv_xlen == 32))
return janet_ckeywordv("riscv32");
#elif (defined(__sparc__)) #elif (defined(__sparc__))
return janet_ckeywordv("sparc"); return janet_ckeywordv("sparc");
#elif (defined(__ppc__)) #elif (defined(__ppc__))