|
|
|
|
|
by jfmc
1522 days ago
|
|
What about pointer size? Is still only 32-bits? It is impossible to write some C programs when you do not know the size of your data and pointers. I'm asking that because despite all the hype, wasm binaries are still 32-bit (at least in browsers), while 32-bit OS are being deprecated. 64-bit pointers are really good for some applications, with no performance degradation at all. Does Wasm 2.0 support branch instructions needed for irreducible control flows? (without the relooper hack) |
|
That probably won't be the case with wasm64 unfortunately. A hidden advantage of wasm using a 32 bit address space while primarily targeting 64 bit platforms is that runtimes can get free implicit bounds checking by carving out a 4GB block of virtual memory for each wasm instance, so out-of-bounds accesses are trapped by the hardware.
That trick won't work for wasm64, so runtimes will have to go back to inserting explicit bounds checks at every memory access, and it'll be a tradeoff where in exchange for being able to access more memory everything will run a bit slower.