Start testing runtime execution of wasm32 simd intrinsics#715
Start testing runtime execution of wasm32 simd intrinsics#715alexcrichton wants to merge 3 commits intorust-lang:masterfrom
Conversation
We can even test some of the functions!
|
I should also point out that building node on CI may just take too long, so we may want to just hold off on this until Node 12 is release. (I don't know when that will be, but I presume not too far in the future) |
|
Looks like the build job is getting very close to the 50min travis time limit (49min ..). The error is: so it appears that node does indeed build in that timeframe, but tar failed. |
|
Alas! That was probably a bug around the wasm-bindgen release but the 50m build time is a deal breaker for sure. It looks like Node 12 may be released by the end of the month though, so we can try again around then! |
|
If you want to merge this in the meantime, a quick "fix" would be to just compile node 12 from source on Linux, tar it, and upload the result somewhere (e.g. a github repo_, and pull that here. |
|
It's possible yeah but there's not necessarily a burning need to get this in, so I'm fine waiting |
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/noderepository 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
+simd128feature (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+simd128and executes the resulting binary in node.js. Unfortunately compiling with just+simd128results in lots of LLVM errors, so we also compile with--cfg only_node_compatibleto 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 testsand 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