Closed SoniEx2 closed 7 months ago
Thank you @SoniEx2 for this; how shall we test this in our CI? Do we have to use WABT, or ..?
How is simde testing set up? The intended use-case of this feature is to run unmodified wasm (simd) tests on s390x platform, including (simd) endian tests. Certainly, using wasm2c would work, but may be too heavyweight...? (And arguably the cyclic dependency is less than ideal...)
How is simde testing set up? The intended use-case of this feature is to run unmodified wasm (simd) tests on s390x platform, including (simd) endian tests. Certainly, using wasm2c would work, but may be too heavyweight...? (And arguably the cyclic dependency is less than ideal...)
In https://github.com/simd-everywhere/simde/pull/1114/commits/9212c4a271cd9319759e0054a4380c470f650c67 I added s390x GCC builds using -DSIMDE_WASM_REVERSE_LANE_ORDER
; should that be enough?
Error log from s390x qemu + GCC 12: https://github.com/simd-everywhere/simde/actions/runs/7129811835/job/19414754673?pr=1114#step:10:1012
hmm...
the feature does work in wabt: https://github.com/SoniEx2/wasm2kotlin/actions/runs/7122216960/job/19392874088
however, wabt has code to specifically take advantage of reverse lane order, while the existing simde tests may not...
will look in a bit, currently on phone.
Here is some of the test code:
ah, indeed!
since wabt stores the entire wasm memory in reverse byte order (so wasm byte address 0 is at mem[size-1]), it aligns nicely with reverse lane order. but the simde tests assume direct byte order.
the solution we would like to see would be for the tests to use simde_wasm_*_make
, but we no longer feel like these changes would be a particularly good fit for simde. we will just do what we need to do in wabt, tho if anyone wants to revisit this whole thing at some point, they are welcome to do so.
thanks anyway.
This is probably slower than it needs to be, but we tried to keep it clean more than anything.
Reverse-lane ABI is used in wabt, and even in wasmtime sometimes. Not really aware of any other wasm runtimes that support s390x/big-endian platforms...
(This is also probably wrong somehow, what with the whole "new contributor" thing. Suggestions/feedback/guidance would be appreciated.)
Closes #1113