bjorn3 commented on issue #2492:
This doesn't actually implement handling different endianness in the backends.
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.
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.
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: Dec 23 2024 at 12:05 UTC