From: Fabrice Bellard Date: Mon, 2 Nov 2026 09:26:42 +0000 (+0100) Subject: arm64: use nan boxing only on Mac OS as other OSes may use user pointers with more... X-Git-Url: https://git.kaiwu.me/?a=commitdiff_plain;h=809cf738f5d88b21d166fcf2dfdab8c1fe49fd4d;p=quickjs.git arm64: use nan boxing only on Mac OS as other OSes may use user pointers with more than 47 bits (#588) --- diff --git a/quickjs.h b/quickjs.h index 0708e60..747d849 100644 --- a/quickjs.h +++ b/quickjs.h @@ -63,7 +63,7 @@ typedef uint32_t JSAtom; #if !defined(JS_PTR64) #define JS_NAN_BOXING #define JS_NAN_BOX_TAG_SHIFT 32 -#elif defined(__x86_64__) || defined(__aarch64__) || defined(__riscv) +#elif defined(__x86_64__) || (defined(__aarch64__) && defined(__APPLE__)) || defined(__riscv) /* we assume pointers fit on 47 bits */ #define JS_NAN_BOXING #define JS_NAN_BOX_TAG_SHIFT 47