diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-10-03 18:07:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-03 18:07:02 -0700 |
commit | 3c78269032071490bc13dc5dbac02567d4d491e0 (patch) | |
tree | a00c874c18dd2e00fbb2d05aa104ee8131a7d1c5 /src/js | |
parent | fc6d2df4eedfef53a0a29fed1ff3ce4707556700 (diff) | |
download | binaryen-3c78269032071490bc13dc5dbac02567d4d491e0.tar.gz binaryen-3c78269032071490bc13dc5dbac02567d4d491e0.tar.bz2 binaryen-3c78269032071490bc13dc5dbac02567d4d491e0.zip |
v8x16.swizzle (#2368)
As specified at
https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#swizzling-using-variable-indices.
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/binaryen.js-post.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 8769e1c9e..b11d2769b 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -418,6 +418,7 @@ Module['WidenLowSVecI16x8ToVecI32x4'] = Module['_BinaryenWidenLowSVecI16x8ToVecI Module['WidenHighSVecI16x8ToVecI32x4'] = Module['_BinaryenWidenHighSVecI16x8ToVecI32x4'](); Module['WidenLowUVecI16x8ToVecI32x4'] = Module['_BinaryenWidenLowUVecI16x8ToVecI32x4'](); Module['WidenHighUVecI16x8ToVecI32x4'] = Module['_BinaryenWidenHighUVecI16x8ToVecI32x4'](); +Module['SwizzleVec8x16'] = Module['_BinaryenSwizzleVec8x16'](); // The size of a single literal in memory as used in Const creation, // which is a little different: we don't want users to need to make @@ -1845,6 +1846,9 @@ function wrapModule(module, self) { return Module['_BinaryenSIMDShuffle'](module, left, right, i8sToStack(mask)); }); }, + 'swizzle': function(left, right) { + return Module['_BinaryenBinary'](module, Module['SwizzleVec8x16'], left, right); + }, 'load_splat': function(offset, align, ptr) { return Module['_BinaryenSIMDLoad'](module, Module['LoadSplatVec8x16'], offset, align, ptr); }, |