summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-02-01 16:53:01 -0800
committerGitHub <noreply@github.com>2021-02-01 16:53:01 -0800
commitb5c287567ebcb3cbb1b1acb7f9e717f8b834ea83 (patch)
tree158cb452f58553cc0244d98c45e9d2b2705c1bbd /test
parenta4837c095275b465005841616ff10bcd0b0d7996 (diff)
downloadbinaryen-b5c287567ebcb3cbb1b1acb7f9e717f8b834ea83.tar.gz
binaryen-b5c287567ebcb3cbb1b1acb7f9e717f8b834ea83.tar.bz2
binaryen-b5c287567ebcb3cbb1b1acb7f9e717f8b834ea83.zip
Prototype i32x4.widen_i8x16_{s,u} (#3535)
As proposed in https://github.com/WebAssembly/simd/pull/395. Note that the other instructions in the proposal have not been implemented in LLVM or in V8, so there is no need to implement them in Binaryen right now either. This PR introduces a new expression class for the new instructions because they uniquely take an immediate argument identifying which portion of the input vector to widen.
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/exception-handling.js.txt6
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt58
-rw-r--r--test/simd.wast10
-rw-r--r--test/simd.wast.from-wast10
-rw-r--r--test/simd.wast.fromBinary10
-rw-r--r--test/simd.wast.fromBinary.noDebugInfo10
6 files changed, 72 insertions, 32 deletions
diff --git a/test/binaryen.js/exception-handling.js.txt b/test/binaryen.js/exception-handling.js.txt
index e7c72e6a7..69b619564 100644
--- a/test/binaryen.js/exception-handling.js.txt
+++ b/test/binaryen.js/exception-handling.js.txt
@@ -19,6 +19,6 @@
)
)
-getExpressionInfo(throw) = {"id":47,"type":1,"event":"e"}
-getExpressionInfo(rethrow) = {"id":48,"type":1,"depth":0}
-getExpressionInfo(try) = {"id":46,"type":1,"hasCatchAll":0}
+getExpressionInfo(throw) = {"id":48,"type":1,"event":"e"}
+getExpressionInfo(rethrow) = {"id":49,"type":1,"depth":0}
+getExpressionInfo(try) = {"id":47,"type":1,"hasCatchAll":0}
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 5ad60b286..9b45d9a01 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -76,35 +76,35 @@ SIMDShuffleId: 32
SIMDTernaryId: 33
SIMDShiftId: 34
SIMDLoadId: 35
-MemoryInitId: 37
-DataDropId: 38
-MemoryCopyId: 39
-MemoryFillId: 40
-PopId: 41
-RefNullId: 42
-RefIsId: 43
-RefFuncId: 44
-RefEqId: 45
-TryId: 46
-ThrowId: 47
-RethrowId: 48
-TupleMakeId: 49
-TupleExtractId: 50
-I31NewId: 51
-I31GetId: 52
-CallRefId: 53
-RefTestId: 54
-RefCastId: 55
-BrOnId: 56
-RttCanonId: 57
-RttSubId: 58
-StructNewId: 59
-StructGetId: 60
-StructSetId: 61
-ArrayNewId: 62
-ArrayGetId: 63
-ArraySetId: 64
-ArrayLenId: 65
+MemoryInitId: 38
+DataDropId: 39
+MemoryCopyId: 40
+MemoryFillId: 41
+PopId: 42
+RefNullId: 43
+RefIsId: 44
+RefFuncId: 45
+RefEqId: 46
+TryId: 47
+ThrowId: 48
+RethrowId: 49
+TupleMakeId: 50
+TupleExtractId: 51
+I31NewId: 52
+I31GetId: 53
+CallRefId: 54
+RefTestId: 55
+RefCastId: 56
+BrOnId: 57
+RttCanonId: 58
+RttSubId: 59
+StructNewId: 60
+StructGetId: 61
+StructSetId: 62
+ArrayNewId: 63
+ArrayGetId: 64
+ArraySetId: 65
+ArrayLenId: 66
getExpressionInfo={"id":15,"type":4,"op":6}
(f32.neg
(f32.const -33.61199951171875)
diff --git a/test/simd.wast b/test/simd.wast
index a171c5398..8d12ea0ac 100644
--- a/test/simd.wast
+++ b/test/simd.wast
@@ -1436,4 +1436,14 @@
(local.get $0)
)
)
+ (func $i32x4.widen_i8x16_s (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_s 0
+ (local.get $0)
+ )
+ )
+ (func $i32x4.widen_i8x16_u (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_u 0
+ (local.get $0)
+ )
+ )
)
diff --git a/test/simd.wast.from-wast b/test/simd.wast.from-wast
index 223191c18..6fbacea11 100644
--- a/test/simd.wast.from-wast
+++ b/test/simd.wast.from-wast
@@ -1454,4 +1454,14 @@
(local.get $0)
)
)
+ (func $i32x4.widen_i8x16_s (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_s 0
+ (local.get $0)
+ )
+ )
+ (func $i32x4.widen_i8x16_u (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_u 0
+ (local.get $0)
+ )
+ )
)
diff --git a/test/simd.wast.fromBinary b/test/simd.wast.fromBinary
index 1c0b12493..4c84b5b25 100644
--- a/test/simd.wast.fromBinary
+++ b/test/simd.wast.fromBinary
@@ -1454,5 +1454,15 @@
(local.get $0)
)
)
+ (func $i32x4.widen_i8x16_s (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_s 0
+ (local.get $0)
+ )
+ )
+ (func $i32x4.widen_i8x16_u (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_u 0
+ (local.get $0)
+ )
+ )
)
diff --git a/test/simd.wast.fromBinary.noDebugInfo b/test/simd.wast.fromBinary.noDebugInfo
index 3feb5a7b4..bb5cdd5e0 100644
--- a/test/simd.wast.fromBinary.noDebugInfo
+++ b/test/simd.wast.fromBinary.noDebugInfo
@@ -1454,5 +1454,15 @@
(local.get $0)
)
)
+ (func $256 (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_s 0
+ (local.get $0)
+ )
+ )
+ (func $257 (param $0 v128) (result v128)
+ (i32x4.widen_i8x16_u 0
+ (local.get $0)
+ )
+ )
)