On 4/10/25 15:13, Kohei Tokunaga wrote:
> The biggest problem I'm seeing is we no longer support 64-bit guests on
> 32-bit hosts, and don't plan to revert that.
Yes, so the sixth patch ("[PATCH 06/10] include/exec: Allow using 64bit
guest addresses on emscripten") should be considered as a temporary
workaround, enabled only for Emsripten builds. It will be removed once
wasm64 gains broader support and is adopted in the Wasm backend.
Maybe there's a way though. Currently we don't support 64-bit guests on
32-bit hosts, but more precisely we don't support 64-bit guests with
32-bit host word size.
The wasm TCG backend is able to compile with 64-bit words:
+#define TCG_TARGET_HAS_div_i64 1
+#define TCG_TARGET_HAS_rem_i64 1
etc.
and if x32 was a thing it would as well. In fact the changes in patch
6/10 are not a full revert, and the "#ifdef EMSCRIPTEN" could be changed to
#if HOST_LONG_BITS >= TARGET_LONG_BITS
... use uintptr_t
#else
... use uint64_t
#endif
Paolo