simd-everywhere / simde

Implementations of SIMD instruction sets for systems which don't natively support them.
https://simd-everywhere.github.io/blog/
MIT License
2.32k stars 239 forks source link

wasm simd128: "big-endian" ABI support? #1113

Closed SoniEx2 closed 5 months ago

SoniEx2 commented 9 months ago

Both wasm2c and wasmtime are known for supporting storing v128 lanes in reverse order on big-endian platforms. It would be nice if simde supported it too, as it would simplify wasm2c a lot without adding too much complexity in simde. Since a v128 acts as a slice of wasm memory, it should be aware of how wasm memory is represented on the host. You may want to take a look at webassembly/wabt#2340 for more details.

(We do note that forcing this big-endian representation on little-endian hosts has its uses, even as it goes against the wasm spec. In particular it makes running some regression tests (e.g. in pull requests) much faster than running the full test suite in qemu.)

mr-c commented 9 months ago

@SoniEx2 I would accept contributions to add a flag that accomplishes this, yes!

mr-c commented 5 months ago

Closing as per https://github.com/WebAssembly/wabt/pull/2340#issuecomment-1928513356 and https://github.com/simd-everywhere/simde/pull/1114#issuecomment-1924646635