From 756a718a16e96b37ae9a0ef6cb7e56210bef3b13 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Thu, 8 Apr 2021 07:52:49 +0200 Subject: Add iNxM.extadd_pairwise_* SIMD instructions to C/JS API (#3780) Adds C/JS APIs for the SIMD instructions * ExtAddPairwiseSVecI8x16ToI16x8 * ExtAddPairwiseUVecI8x16ToI16x8 * ExtAddPairwiseSVecI16x8ToI32x4 * ExtAddPairwiseUVecI16x8ToI32x4 --- src/js/binaryen.js-post.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/js') diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 80affeefc..15e342eb8 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -459,6 +459,10 @@ function initializeConstants() { 'FloorVecF64x2', 'TruncVecF64x2', 'NearestVecF64x2', + 'ExtAddPairwiseSVecI8x16ToI16x8', + 'ExtAddPairwiseUVecI8x16ToI16x8', + 'ExtAddPairwiseSVecI16x8ToI32x4', + 'ExtAddPairwiseUVecI16x8ToI32x4', 'TruncSatSVecF32x4ToVecI32x4', 'TruncSatUVecF32x4ToVecI32x4', 'ConvertSVecI32x4ToVecF32x4', @@ -1717,6 +1721,12 @@ function wrapModule(module, self = {}) { 'avgr_u'(left, right) { return Module['_BinaryenBinary'](module, Module['AvgrUVecI16x8'], left, right); }, + 'extadd_pairwise_i8x16_s'(value) { + return Module['_BinaryenUnary'](module, Module['ExtAddPairwiseSVecI8x16ToI16x8'], value); + }, + 'extadd_pairwise_i8x16_u'(value) { + return Module['_BinaryenUnary'](module, Module['ExtAddPairwiseUVecI8x16ToI16x8'], value); + }, 'narrow_i32x4_s'(left, right) { return Module['_BinaryenBinary'](module, Module['NarrowSVecI32x4ToVecI16x8'], left, right); }, @@ -1822,6 +1832,12 @@ function wrapModule(module, self = {}) { 'dot_i16x8_s'(left, right) { return Module['_BinaryenBinary'](module, Module['DotSVecI16x8ToVecI32x4'], left, right); }, + 'extadd_pairwise_i16x8_s'(value) { + return Module['_BinaryenUnary'](module, Module['ExtAddPairwiseSVecI16x8ToI32x4'], value); + }, + 'extadd_pairwise_i16x8_u'(value) { + return Module['_BinaryenUnary'](module, Module['ExtAddPairwiseUVecI16x8ToI32x4'], value); + }, 'trunc_sat_f32x4_s'(value) { return Module['_BinaryenUnary'](module, Module['TruncSatSVecF32x4ToVecI32x4'], value); }, -- cgit v1.2.3