From 057dccad8f2dd0ff966b2827f08f00f3f5e142df Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Thu, 9 Feb 2023 03:09:53 -0600 Subject: [PATCH] Turn on nanboxing by default for risc-v 64. --- src/include/janet.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/include/janet.h b/src/include/janet.h index 67c84e16..1df3e997 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -280,10 +280,11 @@ extern "C" { #ifndef JANET_NO_NANBOX #ifdef JANET_32 #define JANET_NANBOX_32 -#elif defined(__x86_64__) || defined(_WIN64) +#elif defined(__x86_64__) || defined(_WIN64) || defined(__riscv) /* We will only enable nanboxing by default on 64 bit systems - * on x86. This is mainly because the approach is tied to the - * implicit 47 bit address space. */ + * for x64 and risc-v. This is mainly because the approach is tied to the + * implicit 47 bit address space. Many arches allow/require this, but not all, + * and it requires cooperation from the OS. ARM should also work in many configurations. */ #define JANET_NANBOX_64 #endif #endif