'wasm32' reflects the wasm architecture as spec'ed today. It's so named
because it has 32-bit pointers (i.e. the address operands of loads and
stores are i32), but it also has 64-bit integer operations, so for
computation you should be covered. We've assumed that eventually we will
spec a version of wasm with 64-bit address space (so we put the wasm64 name
in LLVM) but it's not really on the roadmap for the near term. Today,
functions that have i64 return or argument types can't be exported or
imported to JS, but once JS BigInt support gets into the browsers, the idea
is that i64s in wasm would be reflected as BigInts in JS.

On Tue, Mar 27, 2018 at 1:47 AM Floh <[email protected]> wrote:

> A bit offtopic but may be some of the LLVM WASM backend people are lurking
> here :)
>
> I wonder what's the exact difference between the wasm32-* and wasm64-*
> triples in the LLVM backend? Most importantly does wasm32 have 'native'
> 64-bit integers? (I hope it does, and wasm32 vs wasm64 is only about the
> pointer size)
>
> I stumbled over this when trying out the LLVM backends via emscripten
> (with "emsdk install --enable-wasm"), and noticed that the emscripten SDK
> only seems to have support for wasm32 (see here for instance:
> https://github.com/kripken/emscripten/blob/b73a222717da22c16cfecd3f91437eb6b189951d/tools/shared.py#L890
> )
>
> I'm currently working on code that would benefit from 64-bit integers, so
> if wasm32 does have that it's all good.
>
> And btw, I have tested my home computer emulator (one of the more complex
> pieces of code I've written), and it's looking good with the LLVM wasm
> backend. Performance is about the same as the fastcomp+binaryen path though
> (but I guess that's to be expected).
>
> Cheers :)
> -Floh.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to