From 361de9f32780b770e4ecbe6bd7a2cd94a5acccab Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Mon, 3 Feb 2025 14:30:31 -0600 Subject: [PATCH] Support 64-bit WebAssembly (#1491) --- Jolt/Core/Core.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jolt/Core/Core.h b/Jolt/Core/Core.h index 2caa59ca7..7ecb91b93 100644 --- a/Jolt/Core/Core.h +++ b/Jolt/Core/Core.h @@ -195,7 +195,11 @@ #elif defined(JPH_PLATFORM_WASM) // WebAssembly CPU architecture #define JPH_CPU_WASM - #define JPH_CPU_ADDRESS_BITS 32 + #if defined(__wasm64__) + #define JPH_CPU_ADDRESS_BITS 64 + #else + #define JPH_CPU_ADDRESS_BITS 32 + #endif #define JPH_VECTOR_ALIGNMENT 16 #define JPH_DVECTOR_ALIGNMENT 32 #ifdef __wasm_simd128__