Skip to content

Commit 8a7b749

Browse files
authored
wasm2c: add SIMD support (#2119)
This change incorporates [simd-everywhere](https://github.com/simd-everywhere/simde) into the wasm2c output, which maps wasm SIMD C intrinsics to any supported target architecture.
1 parent c831b98 commit 8a7b749

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2032
-75
lines changed

.github/workflows/build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
env:
8686
USE_NINJA: "1"
8787
CC: "clang"
88+
WASM2C_CFLAGS: "-march=x86-64-v2" # currently required for SIMDe to pass some tests on x86-64
8889
strategy:
8990
matrix:
9091
sanitizer: [asan, ubsan]
@@ -106,7 +107,7 @@ jobs:
106107
env:
107108
USE_NINJA: "1"
108109
CC: "clang" # used by the wasm2c tests
109-
WASM2C_CFLAGS: "-fsanitize=address -DWASM_RT_MEMCHECK_SIGNAL_HANDLER=0"
110+
WASM2C_CFLAGS: "-march=x86-64-v2 -fsanitize=address -DWASM_RT_MEMCHECK_SIGNAL_HANDLER=0"
110111
steps:
111112
- uses: actions/setup-python@v1
112113
with:

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
[submodule "third_party/picosha2"]
1717
path = third_party/picosha2
1818
url = https://github.com/okdshin/PicoSHA2
19+
[submodule "third_party/simde"]
20+
path = third_party/simde
21+
url = https://github.com/simd-everywhere/simde

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Wabt has been compiled to JavaScript via emscripten. Some of the functionality i
5151
| [mutable globals][] | `--disable-mutable-globals` |||||||
5252
| [nontrapping float-to-int conversions][] | `--disable-saturating-float-to-int` |||||||
5353
| [sign extension][] | `--disable-sign-extension` |||||||
54-
| [simd][] | `--disable-simd` |||||| |
54+
| [simd][] | `--disable-simd` |||||| 🚧 |
5555
| [threads][] | `--enable-threads` | ||||| |
5656
| [multi-value][] | `--disable-multi-value` |||||||
5757
| [tail-call][] | `--enable-tail-call` | ||||| |

0 commit comments

Comments
 (0)