Stream: git-wasmtime

Topic: wasmtime / issue #2492 Support explicit endianness in Cra...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2021 at 13:00):

bjorn3 commented on issue #2492:

This doesn't actually implement handling different endianness in the backends.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2021 at 13:11):

uweigand commented on issue #2492:

This doesn't actually implement handling different endianness in the backends.

You can look at the new s390x backend, which does implement both native (big-endian) and little-endian accesses. On little-endian platforms there is normally no need to implement big-endian access.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2021 at 13:15):

bjorn3 commented on issue #2492:

Big-endian access would be useful for https://github.com/bytecodealliance/wasmtime/pull/2953#issuecomment-851651077 There is currently no bswap instruction and even if there was, explicitly marking the load as little-endian and then doing a bswap would be slower on big-endian systems than directly doing a big-endian load.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2021 at 13:29):

uweigand commented on issue #2492:

Big-endian access would be useful for #2953 (comment) There is currently no bswap instruction and even if there was, explicitly marking the load as little-endian and then doing a bswap would be slower on big-endian systems than directly doing a big-endian load.

Well, I guess someone familiar with the other platforms could implement big-endian memory access support for the other back-ends. I'm not sure if there are direct big-endian load/store instructions on all other platforms cranelift supports; where there are none, the back-end would have to fall back to bswap or equivalent to implement the IR semantics.


Last updated: Nov 22 2024 at 16:03 UTC