-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement reverse-lane ABI for wasm #1114
Conversation
385c646
to
3fcbfe7
Compare
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...) |
In 9212c4a I added s390x GCC builds using |
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: simde/test/wasm/simd128/bitmask.c Lines 62 to 64 in 471a342
|
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 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