Start testing runtime execution of wasm32 simd intrinsics #715
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit starts to add support to CI to not only compile all wasm32 SIMD intrinsics but also actually execute some of them at runtime. The master branch of the
nodejs/node
repository has recently merged an update of v8 which aligns internal opcode definitions with the most recent version of the wasm SIMD spec. As a result we can start actually executing some WebAssembly code with SIMD instructions in it!Unfortunately not all SIMD instructions are implemented in v8 right now. In LLVM this is known as the
+simd128
feature (what v8 implements) and the+unsupported-simd128
(everything v8 doesn't implement but is spec'd). We continue to compile the library with both features (to make sure it works) but this PR then also adds a mdoe where it compiles with only+simd128
and executes the resulting binary in node.js. Unfortunately compiling with just+simd128
results in lots of LLVM errors, so we also compile with--cfg only_node_compatible
to statically remove non-node-compatible functions.The end result is that we're successfully executing all
#[assert_instr]
annotations! Additionally I've started uncommenting some tests inmod tests
and updating them to the new intrinsic names. There's still a lot more work to be done there, but I figured it'd be good to post this for initial feedback.In general, the changes here are:
#[cfg]
to optionally remove SIMD which isn't implemented in node.js