diff options
author | Daniel Wirtz <dcode@dcode.io> | 2021-04-07 23:27:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-07 23:27:06 +0200 |
commit | a36c455f6a2e9fa48751c985fa49b33ce94277c4 (patch) | |
tree | 02967daa87d3ae20b0aa3026610c8a55a8012eec /test | |
parent | 2f2d5a80197b837aea928a0a604a13cc1c74219b (diff) | |
download | binaryen-a36c455f6a2e9fa48751c985fa49b33ce94277c4.tar.gz binaryen-a36c455f6a2e9fa48751c985fa49b33ce94277c4.tar.bz2 binaryen-a36c455f6a2e9fa48751c985fa49b33ce94277c4.zip |
Add i64x2.extend_low/high_* SIMD instructions to C/JS API (#3778)
Adds C/JS APIs for the SIMD instructions
* ExtendLowSVecI32x4ToVecI64x2
* ExtendHighSVecI32x4ToVecI64x2
* ExtendLowUVecI32x4ToVecI64x2
* ExtendHighUVecI32x4ToVecI64x2
Diffstat (limited to 'test')
-rw-r--r-- | test/binaryen.js/kitchen-sink.js | 4 | ||||
-rw-r--r-- | test/binaryen.js/kitchen-sink.js.txt | 40 | ||||
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 4 | ||||
-rw-r--r-- | test/example/c-api-kitchen-sink.txt | 20 |
4 files changed, 68 insertions, 0 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index 5e70b0072..c0301c0d6 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -301,6 +301,10 @@ function test_core() { module.i32x4.extend_high_i16x8_s(module.v128.const(v128_bytes)), module.i32x4.extend_low_i16x8_u(module.v128.const(v128_bytes)), module.i32x4.extend_high_i16x8_u(module.v128.const(v128_bytes)), + module.i64x2.extend_low_i32x4_s(module.v128.const(v128_bytes)), + module.i64x2.extend_high_i32x4_s(module.v128.const(v128_bytes)), + module.i64x2.extend_low_i32x4_u(module.v128.const(v128_bytes)), + module.i64x2.extend_high_i32x4_u(module.v128.const(v128_bytes)), // Binary module.i32.add(module.i32.const(-10), module.i32.const(-11)), module.f64.sub(module.f64.const(-9005.841), module.f64.const(-9007.333)), diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt index 8d7ccdbca..64ff48426 100644 --- a/test/binaryen.js/kitchen-sink.js.txt +++ b/test/binaryen.js/kitchen-sink.js.txt @@ -582,6 +582,26 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} ) ) (drop + (i64x2.extend_low_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_high_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_low_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_high_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop (i32.add (i32.const -10) (i32.const -11) @@ -2436,6 +2456,26 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7} ) ) (drop + (i64x2.extend_low_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_high_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_low_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_high_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop (i32.add (i32.const -10) (i32.const -11) diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index abc5e1489..887f33b58 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -439,6 +439,10 @@ void test_core() { makeUnary(module, BinaryenExtendHighSVecI16x8ToVecI32x4(), v128), makeUnary(module, BinaryenExtendLowUVecI16x8ToVecI32x4(), v128), makeUnary(module, BinaryenExtendHighUVecI16x8ToVecI32x4(), v128), + makeUnary(module, BinaryenExtendLowSVecI32x4ToVecI64x2(), v128), + makeUnary(module, BinaryenExtendHighSVecI32x4ToVecI64x2(), v128), + makeUnary(module, BinaryenExtendLowUVecI32x4ToVecI64x2(), v128), + makeUnary(module, BinaryenExtendHighUVecI32x4ToVecI64x2(), v128), // Binary makeBinary(module, BinaryenAddInt32(), i32), makeBinary(module, BinaryenSubFloat64(), f64), diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 8bf0c770a..244777478 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -492,6 +492,26 @@ BinaryenFeatureAll: 8191 ) ) (drop + (i64x2.extend_low_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_high_i32x4_s + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_low_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop + (i64x2.extend_high_i32x4_u + (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d) + ) + ) + (drop (i32.add (i32.const -10) (i32.const -11) |