-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Support -msse4 alias to -msse4.2 #12746
Comments
Supporting |
- Switch from `-msse` to `-msse4.2`. In theory, those should be identical, but Emscripten currently has a bug where only latter form is supported: emscripten-core/emscripten#12746. Since we're using only SSE 4.2, an explicit form seems to be preferable anyway. - Add `-msimd128` to flags to actually enable WebAssembly SIMD when performing SIMD detection. It's currently required in addition to `-msse*` / `-mfpu=neon` flags which only perform translation of corresponding intrinsics to Wasm SIMD ones. See a discussion at emscripten-core/emscripten#12714 for automating this and making easier in the future. - Remove compilation branch that prevented definitions of `WP2_USE_SSE` and `WP2_USE_NEON` on Emscripten even when SIMD support was detected at compile-time. - Add an implementation of `WP2GetCPUInfo` for Emscripten which uses static `WP2_USE_*` flags to determine if a corresponding SIMD instruction is supported. This is because Wasm doesn't have proper feature detection (yet) and requires making separate build for SIMD version anyway.
- Switch from `-msse` to `-msse4.2`. In theory, those should be identical, but Emscripten currently has a bug where only latter form is supported: emscripten-core/emscripten#12746. Since we're using only SSE 4.2, an explicit form seems to be preferable anyway. - Add `-msimd128` to flags to actually enable WebAssembly SIMD when performing SIMD detection. It's currently required in addition to `-msse*` / `-mfpu=neon` flags which only perform translation of corresponding intrinsics to Wasm SIMD ones. See a discussion at emscripten-core/emscripten#12714 for automating this and making easier in the future. - Remove compilation branch that prevented definitions of `WP2_USE_SSE` and `WP2_USE_NEON` on Emscripten even when SIMD support was detected at compile-time. - Add an implementation of `WP2GetCPUInfo` for Emscripten which uses static `WP2_USE_*` flags to determine if a corresponding SIMD instruction is supported. This is because Wasm doesn't have proper feature detection (yet) and requires making separate build for SIMD version anyway.
- Switch from `-msse` to `-msse4.2`. In theory, those should be identical, but Emscripten currently has a bug where only latter form is supported: emscripten-core/emscripten#12746. Since we're using only SSE 4.2, an explicit form seems to be preferable anyway. - Add `-msimd128` to flags to actually enable WebAssembly SIMD when performing SIMD detection. It's currently required in addition to `-msse*` / `-mfpu=neon` flags which only perform translation of corresponding intrinsics to Wasm SIMD ones. See a discussion at emscripten-core/emscripten#12714 for automating this and making easier in the future. - Remove compilation branch that prevented definitions of `WP2_USE_SSE` and `WP2_USE_NEON` on Emscripten even when SIMD support was detected at compile-time. - Add an implementation of `WP2GetCPUInfo` for Emscripten which uses static `WP2_USE_*` flags to determine if a corresponding SIMD instruction is supported. This is because Wasm doesn't have proper feature detection (yet) and requires making separate build for SIMD version anyway.
Hi, I would like to take this issue as my "first bug", if it's ok I'd have two questions:
thank you for the advice! |
@giatorta Best way is to look at places in Emscripten codebase where "-msse4.2" occurs and see how to add "-msse4" there so that it would behave in the same way. |
@RReverser thanks for the hint, I think I now understand what I have to fix. Currently working on it in my fork of the repo... |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
Also update some of the test decorators to support parameterized tests so that test_sse4 can be parameterized to use either -msse4 or -msse4.2. Fixes #12746.
Also update some of the test decorators to support parameterized tests so that test_sse4 can be parameterized to use either -msse4 or -msse4.2. Fixes #12746.
Just ran into this while porting a real project. On native x86 target Clang supports
-msse4
as an alias for-msse4.2
, however Emscripten seems to ignore it and pass as-is to the underlying Clang (making it no-op). cc @juj @tlively @sbc100The text was updated successfully, but these errors were encountered: