From 0b8f3e3440ca3bcdfda6628c7ea891553635d92c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20K=C3=A4m=C3=A4r=C3=A4inen?= Date: Wed, 13 May 2026 19:48:25 +0300 Subject: [PATCH] Support for wasm64 --- include/private/gcconfig.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 1e476bd16..4b1235f83 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -676,7 +676,11 @@ EXTERN_C_BEGIN # endif # if defined(__EMSCRIPTEN__) -# define I386 +# ifdef __wasm64__ +# define X86_64 +# else +# define I386 +# endif # define mach_type_known # endif @@ -896,8 +900,13 @@ EXTERN_C_BEGIN # ifdef __EMSCRIPTEN__ # define OS_TYPE "EMSCRIPTEN" -# define CPP_WORDSZ 32 -# define ALIGNMENT 4 +# ifdef __wasm64__ +# define CPP_WORDSZ 64 +# define ALIGNMENT 8 +# else +# define CPP_WORDSZ 32 +# define ALIGNMENT 4 +# endif # define DATASTART (ptr_t)ALIGNMENT # define DATAEND (ptr_t)ALIGNMENT /* Since JavaScript/asm.js/WebAssembly is not able to access the */