summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-06-05 10:46:23 -0700
committerGitHub <noreply@github.com>2020-06-05 10:46:23 -0700
commit037d7a5d04c376b2fa8fc26076af9579c3712063 (patch)
tree510e3023d8472e1d235b0002adff963fae89009e /test
parent0c58de1d350928e5e45594e4642349dc77697725 (diff)
downloadbinaryen-037d7a5d04c376b2fa8fc26076af9579c3712063.tar.gz
binaryen-037d7a5d04c376b2fa8fc26076af9579c3712063.tar.bz2
binaryen-037d7a5d04c376b2fa8fc26076af9579c3712063.zip
Add prototype SIMD rounding instructions (#2895)
As specified in https://github.com/WebAssembly/simd/pull/232.
Diffstat (limited to 'test')
-rw-r--r--test/binaryen.js/kitchen-sink.js8
-rw-r--r--test/binaryen.js/kitchen-sink.js.txt80
-rw-r--r--test/example/c-api-kitchen-sink.c8
-rw-r--r--test/example/c-api-kitchen-sink.txt48
-rw-r--r--test/simd.wast40
-rw-r--r--test/simd.wast.from-wast40
-rw-r--r--test/simd.wast.fromBinary40
-rw-r--r--test/simd.wast.fromBinary.noDebugInfo136
-rw-r--r--test/spec/simd.wast44
9 files changed, 396 insertions, 48 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 6c5afa169..cd3af6750 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -391,6 +391,10 @@ function test_core() {
module.f32x4.max(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f32x4.pmin(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f32x4.pmax(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f32x4.ceil(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f32x4.floor(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f32x4.trunc(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f32x4.nearest(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f64x2.add(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f64x2.sub(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f64x2.mul(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
@@ -399,6 +403,10 @@ function test_core() {
module.f64x2.max(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f64x2.pmin(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.f64x2.pmax(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f64x2.ceil(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f64x2.floor(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f64x2.trunc(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
+ module.f64x2.nearest(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.i8x16.narrow_i16x8_s(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.i8x16.narrow_i16x8_u(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
module.i16x8.narrow_i32x4_s(module.v128.const(v128_bytes), module.v128.const(v128_bytes)),
diff --git a/test/binaryen.js/kitchen-sink.js.txt b/test/binaryen.js/kitchen-sink.js.txt
index 14f8c0d03..d81ea5312 100644
--- a/test/binaryen.js/kitchen-sink.js.txt
+++ b/test/binaryen.js/kitchen-sink.js.txt
@@ -1297,6 +1297,26 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
)
)
(drop
+ (f32x4.ceil
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f32x4.floor
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f32x4.trunc
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f32x4.nearest
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
(f64x2.add
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -1345,6 +1365,26 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
)
)
(drop
+ (f64x2.ceil
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f64x2.floor
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f64x2.trunc
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f64x2.nearest
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
(i8x16.narrow_i16x8_s
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -3095,6 +3135,26 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
)
)
(drop
+ (f32x4.ceil
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f32x4.floor
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f32x4.trunc
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f32x4.nearest
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
(f64x2.add
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -3143,6 +3203,26 @@ getExpressionInfo(tuple[3])={"id":14,"type":5,"value":3.7}
)
)
(drop
+ (f64x2.ceil
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f64x2.floor
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f64x2.trunc
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (f64x2.nearest
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
(i8x16.narrow_i16x8_s
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index 764cc0ba6..1f6ffc9fc 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -564,6 +564,10 @@ void test_core() {
makeBinary(module, BinaryenMaxVecF32x4(), v128),
makeBinary(module, BinaryenPMinVecF32x4(), v128),
makeBinary(module, BinaryenPMaxVecF32x4(), v128),
+ makeBinary(module, BinaryenCeilVecF32x4(), v128),
+ makeBinary(module, BinaryenFloorVecF32x4(), v128),
+ makeBinary(module, BinaryenTruncVecF32x4(), v128),
+ makeBinary(module, BinaryenNearestVecF32x4(), v128),
makeBinary(module, BinaryenAddVecF64x2(), v128),
makeBinary(module, BinaryenSubVecF64x2(), v128),
makeBinary(module, BinaryenMulVecF64x2(), v128),
@@ -572,6 +576,10 @@ void test_core() {
makeBinary(module, BinaryenMaxVecF64x2(), v128),
makeBinary(module, BinaryenPMinVecF64x2(), v128),
makeBinary(module, BinaryenPMaxVecF64x2(), v128),
+ makeBinary(module, BinaryenCeilVecF64x2(), v128),
+ makeBinary(module, BinaryenFloorVecF64x2(), v128),
+ makeBinary(module, BinaryenTruncVecF64x2(), v128),
+ makeBinary(module, BinaryenNearestVecF64x2(), v128),
makeBinary(module, BinaryenNarrowSVecI16x8ToVecI8x16(), v128),
makeBinary(module, BinaryenNarrowUVecI16x8ToVecI8x16(), v128),
makeBinary(module, BinaryenNarrowSVecI32x4ToVecI16x8(), v128),
diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt
index fda846fcb..ff9256fda 100644
--- a/test/example/c-api-kitchen-sink.txt
+++ b/test/example/c-api-kitchen-sink.txt
@@ -1231,6 +1231,30 @@ BinaryenFeatureAll: 1023
)
)
(drop
+ (i16x8.lt_s
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (i16x8.lt_u
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (i16x8.gt_s
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (i16x8.gt_u
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
(f64x2.add
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
@@ -1279,6 +1303,30 @@ BinaryenFeatureAll: 1023
)
)
(drop
+ (i16x8.ge_u
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (i32x4.eq
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (i32x4.ne
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
+ (i32x4.lt_s
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ (v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
+ )
+ )
+ (drop
(i8x16.narrow_i16x8_s
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
(v128.const i32x4 0x04030201 0x08070605 0x0c0b0a09 0x100f0e0d)
diff --git a/test/simd.wast b/test/simd.wast
index edd9a2c43..7ee8760e1 100644
--- a/test/simd.wast
+++ b/test/simd.wast
@@ -844,6 +844,26 @@
(local.get $1)
)
)
+ (func $f32x4.ceil (param $0 v128) (result v128)
+ (f32x4.ceil
+ (local.get $0)
+ )
+ )
+ (func $f32x4.floor (param $0 v128) (result v128)
+ (f32x4.floor
+ (local.get $0)
+ )
+ )
+ (func $f32x4.trunc (param $0 v128) (result v128)
+ (f32x4.trunc
+ (local.get $0)
+ )
+ )
+ (func $f32x4.nearest (param $0 v128) (result v128)
+ (f32x4.nearest
+ (local.get $0)
+ )
+ )
(func $f32x4.abs (param $0 v128) (result v128)
(f32x4.abs
(local.get $0)
@@ -921,6 +941,26 @@
(local.get $1)
)
)
+ (func $f64x2.ceil (param $0 v128) (result v128)
+ (f64x2.ceil
+ (local.get $0)
+ )
+ )
+ (func $f64x2.floor (param $0 v128) (result v128)
+ (f64x2.floor
+ (local.get $0)
+ )
+ )
+ (func $f64x2.trunc (param $0 v128) (result v128)
+ (f64x2.trunc
+ (local.get $0)
+ )
+ )
+ (func $f64x2.nearest (param $0 v128) (result v128)
+ (f64x2.nearest
+ (local.get $0)
+ )
+ )
(func $f64x2.abs (param $0 v128) (result v128)
(f64x2.abs
(local.get $0)
diff --git a/test/simd.wast.from-wast b/test/simd.wast.from-wast
index 35643ec04..508d44c7c 100644
--- a/test/simd.wast.from-wast
+++ b/test/simd.wast.from-wast
@@ -860,6 +860,26 @@
(local.get $1)
)
)
+ (func $f32x4.ceil (param $0 v128) (result v128)
+ (f32x4.ceil
+ (local.get $0)
+ )
+ )
+ (func $f32x4.floor (param $0 v128) (result v128)
+ (f32x4.floor
+ (local.get $0)
+ )
+ )
+ (func $f32x4.trunc (param $0 v128) (result v128)
+ (f32x4.trunc
+ (local.get $0)
+ )
+ )
+ (func $f32x4.nearest (param $0 v128) (result v128)
+ (f32x4.nearest
+ (local.get $0)
+ )
+ )
(func $f32x4.abs (param $0 v128) (result v128)
(f32x4.abs
(local.get $0)
@@ -937,6 +957,26 @@
(local.get $1)
)
)
+ (func $f64x2.ceil (param $0 v128) (result v128)
+ (f64x2.ceil
+ (local.get $0)
+ )
+ )
+ (func $f64x2.floor (param $0 v128) (result v128)
+ (f64x2.floor
+ (local.get $0)
+ )
+ )
+ (func $f64x2.trunc (param $0 v128) (result v128)
+ (f64x2.trunc
+ (local.get $0)
+ )
+ )
+ (func $f64x2.nearest (param $0 v128) (result v128)
+ (f64x2.nearest
+ (local.get $0)
+ )
+ )
(func $f64x2.abs (param $0 v128) (result v128)
(f64x2.abs
(local.get $0)
diff --git a/test/simd.wast.fromBinary b/test/simd.wast.fromBinary
index 40ce99ec2..d53376883 100644
--- a/test/simd.wast.fromBinary
+++ b/test/simd.wast.fromBinary
@@ -860,6 +860,26 @@
(local.get $1)
)
)
+ (func $f32x4.ceil (param $0 v128) (result v128)
+ (f32x4.ceil
+ (local.get $0)
+ )
+ )
+ (func $f32x4.floor (param $0 v128) (result v128)
+ (f32x4.floor
+ (local.get $0)
+ )
+ )
+ (func $f32x4.trunc (param $0 v128) (result v128)
+ (f32x4.trunc
+ (local.get $0)
+ )
+ )
+ (func $f32x4.nearest (param $0 v128) (result v128)
+ (f32x4.nearest
+ (local.get $0)
+ )
+ )
(func $f32x4.abs (param $0 v128) (result v128)
(f32x4.abs
(local.get $0)
@@ -937,6 +957,26 @@
(local.get $1)
)
)
+ (func $f64x2.ceil (param $0 v128) (result v128)
+ (f64x2.ceil
+ (local.get $0)
+ )
+ )
+ (func $f64x2.floor (param $0 v128) (result v128)
+ (f64x2.floor
+ (local.get $0)
+ )
+ )
+ (func $f64x2.trunc (param $0 v128) (result v128)
+ (f64x2.trunc
+ (local.get $0)
+ )
+ )
+ (func $f64x2.nearest (param $0 v128) (result v128)
+ (f64x2.nearest
+ (local.get $0)
+ )
+ )
(func $f64x2.abs (param $0 v128) (result v128)
(f64x2.abs
(local.get $0)
diff --git a/test/simd.wast.fromBinary.noDebugInfo b/test/simd.wast.fromBinary.noDebugInfo
index 85ca0a9f4..474dfc7c5 100644
--- a/test/simd.wast.fromBinary.noDebugInfo
+++ b/test/simd.wast.fromBinary.noDebugInfo
@@ -861,266 +861,306 @@
)
)
(func $149 (param $0 v128) (result v128)
- (f32x4.abs
+ (f32x4.ceil
(local.get $0)
)
)
(func $150 (param $0 v128) (result v128)
- (f32x4.neg
+ (f32x4.floor
(local.get $0)
)
)
(func $151 (param $0 v128) (result v128)
+ (f32x4.trunc
+ (local.get $0)
+ )
+ )
+ (func $152 (param $0 v128) (result v128)
+ (f32x4.nearest
+ (local.get $0)
+ )
+ )
+ (func $153 (param $0 v128) (result v128)
+ (f32x4.abs
+ (local.get $0)
+ )
+ )
+ (func $154 (param $0 v128) (result v128)
+ (f32x4.neg
+ (local.get $0)
+ )
+ )
+ (func $155 (param $0 v128) (result v128)
(f32x4.sqrt
(local.get $0)
)
)
- (func $152 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $156 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
(f32x4.qfma
(local.get $0)
(local.get $1)
(local.get $2)
)
)
- (func $153 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $157 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
(f32x4.qfms
(local.get $0)
(local.get $1)
(local.get $2)
)
)
- (func $154 (param $0 v128) (param $1 v128) (result v128)
+ (func $158 (param $0 v128) (param $1 v128) (result v128)
(f64x2.add
(local.get $0)
(local.get $1)
)
)
- (func $155 (param $0 v128) (param $1 v128) (result v128)
+ (func $159 (param $0 v128) (param $1 v128) (result v128)
(f64x2.sub
(local.get $0)
(local.get $1)
)
)
- (func $156 (param $0 v128) (param $1 v128) (result v128)
+ (func $160 (param $0 v128) (param $1 v128) (result v128)
(f64x2.mul
(local.get $0)
(local.get $1)
)
)
- (func $157 (param $0 v128) (param $1 v128) (result v128)
+ (func $161 (param $0 v128) (param $1 v128) (result v128)
(f64x2.div
(local.get $0)
(local.get $1)
)
)
- (func $158 (param $0 v128) (param $1 v128) (result v128)
+ (func $162 (param $0 v128) (param $1 v128) (result v128)
(f64x2.min
(local.get $0)
(local.get $1)
)
)
- (func $159 (param $0 v128) (param $1 v128) (result v128)
+ (func $163 (param $0 v128) (param $1 v128) (result v128)
(f64x2.max
(local.get $0)
(local.get $1)
)
)
- (func $160 (param $0 v128) (param $1 v128) (result v128)
+ (func $164 (param $0 v128) (param $1 v128) (result v128)
(f64x2.pmin
(local.get $0)
(local.get $1)
)
)
- (func $161 (param $0 v128) (param $1 v128) (result v128)
+ (func $165 (param $0 v128) (param $1 v128) (result v128)
(f64x2.pmax
(local.get $0)
(local.get $1)
)
)
- (func $162 (param $0 v128) (result v128)
+ (func $166 (param $0 v128) (result v128)
+ (f64x2.ceil
+ (local.get $0)
+ )
+ )
+ (func $167 (param $0 v128) (result v128)
+ (f64x2.floor
+ (local.get $0)
+ )
+ )
+ (func $168 (param $0 v128) (result v128)
+ (f64x2.trunc
+ (local.get $0)
+ )
+ )
+ (func $169 (param $0 v128) (result v128)
+ (f64x2.nearest
+ (local.get $0)
+ )
+ )
+ (func $170 (param $0 v128) (result v128)
(f64x2.abs
(local.get $0)
)
)
- (func $163 (param $0 v128) (result v128)
+ (func $171 (param $0 v128) (result v128)
(f64x2.neg
(local.get $0)
)
)
- (func $164 (param $0 v128) (result v128)
+ (func $172 (param $0 v128) (result v128)
(f64x2.sqrt
(local.get $0)
)
)
- (func $165 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $173 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
(f64x2.qfma
(local.get $0)
(local.get $1)
(local.get $2)
)
)
- (func $166 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
+ (func $174 (param $0 v128) (param $1 v128) (param $2 v128) (result v128)
(f64x2.qfms
(local.get $0)
(local.get $1)
(local.get $2)
)
)
- (func $167 (param $0 v128) (result v128)
+ (func $175 (param $0 v128) (result v128)
(i32x4.trunc_sat_f32x4_s
(local.get $0)
)
)
- (func $168 (param $0 v128) (result v128)
+ (func $176 (param $0 v128) (result v128)
(i32x4.trunc_sat_f32x4_u
(local.get $0)
)
)
- (func $169 (param $0 v128) (result v128)
+ (func $177 (param $0 v128) (result v128)
(i64x2.trunc_sat_f64x2_s
(local.get $0)
)
)
- (func $170 (param $0 v128) (result v128)
+ (func $178 (param $0 v128) (result v128)
(i64x2.trunc_sat_f64x2_u
(local.get $0)
)
)
- (func $171 (param $0 v128) (result v128)
+ (func $179 (param $0 v128) (result v128)
(f32x4.convert_i32x4_s
(local.get $0)
)
)
- (func $172 (param $0 v128) (result v128)
+ (func $180 (param $0 v128) (result v128)
(f32x4.convert_i32x4_u
(local.get $0)
)
)
- (func $173 (param $0 v128) (result v128)
+ (func $181 (param $0 v128) (result v128)
(f64x2.convert_i64x2_s
(local.get $0)
)
)
- (func $174 (param $0 v128) (result v128)
+ (func $182 (param $0 v128) (result v128)
(f64x2.convert_i64x2_u
(local.get $0)
)
)
- (func $175 (param $0 i32) (result v128)
+ (func $183 (param $0 i32) (result v128)
(v8x16.load_splat
(local.get $0)
)
)
- (func $176 (param $0 i32) (result v128)
+ (func $184 (param $0 i32) (result v128)
(v16x8.load_splat
(local.get $0)
)
)
- (func $177 (param $0 i32) (result v128)
+ (func $185 (param $0 i32) (result v128)
(v32x4.load_splat
(local.get $0)
)
)
- (func $178 (param $0 i32) (result v128)
+ (func $186 (param $0 i32) (result v128)
(v64x2.load_splat
(local.get $0)
)
)
- (func $179 (param $0 v128) (param $1 v128) (result v128)
+ (func $187 (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_s
(local.get $0)
(local.get $1)
)
)
- (func $180 (param $0 v128) (param $1 v128) (result v128)
+ (func $188 (param $0 v128) (param $1 v128) (result v128)
(i8x16.narrow_i16x8_u
(local.get $0)
(local.get $1)
)
)
- (func $181 (param $0 v128) (param $1 v128) (result v128)
+ (func $189 (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_s
(local.get $0)
(local.get $1)
)
)
- (func $182 (param $0 v128) (param $1 v128) (result v128)
+ (func $190 (param $0 v128) (param $1 v128) (result v128)
(i16x8.narrow_i32x4_u
(local.get $0)
(local.get $1)
)
)
- (func $183 (param $0 v128) (result v128)
+ (func $191 (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_s
(local.get $0)
)
)
- (func $184 (param $0 v128) (result v128)
+ (func $192 (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_s
(local.get $0)
)
)
- (func $185 (param $0 v128) (result v128)
+ (func $193 (param $0 v128) (result v128)
(i16x8.widen_low_i8x16_u
(local.get $0)
)
)
- (func $186 (param $0 v128) (result v128)
+ (func $194 (param $0 v128) (result v128)
(i16x8.widen_high_i8x16_u
(local.get $0)
)
)
- (func $187 (param $0 v128) (result v128)
+ (func $195 (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_s
(local.get $0)
)
)
- (func $188 (param $0 v128) (result v128)
+ (func $196 (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_s
(local.get $0)
)
)
- (func $189 (param $0 v128) (result v128)
+ (func $197 (param $0 v128) (result v128)
(i32x4.widen_low_i16x8_u
(local.get $0)
)
)
- (func $190 (param $0 v128) (result v128)
+ (func $198 (param $0 v128) (result v128)
(i32x4.widen_high_i16x8_u
(local.get $0)
)
)
- (func $191 (param $0 i32) (result v128)
+ (func $199 (param $0 i32) (result v128)
(i16x8.load8x8_u
(local.get $0)
)
)
- (func $192 (param $0 i32) (result v128)
+ (func $200 (param $0 i32) (result v128)
(i16x8.load8x8_s
(local.get $0)
)
)
- (func $193 (param $0 i32) (result v128)
+ (func $201 (param $0 i32) (result v128)
(i32x4.load16x4_s
(local.get $0)
)
)
- (func $194 (param $0 i32) (result v128)
+ (func $202 (param $0 i32) (result v128)
(i32x4.load16x4_u
(local.get $0)
)
)
- (func $195 (param $0 i32) (result v128)
+ (func $203 (param $0 i32) (result v128)
(i64x2.load32x2_s
(local.get $0)
)
)
- (func $196 (param $0 i32) (result v128)
+ (func $204 (param $0 i32) (result v128)
(i64x2.load32x2_u
(local.get $0)
)
)
- (func $197 (param $0 v128) (param $1 v128) (result v128)
+ (func $205 (param $0 v128) (param $1 v128) (result v128)
(v8x16.swizzle
(local.get $0)
(local.get $1)
diff --git a/test/spec/simd.wast b/test/spec/simd.wast
index 26da927a9..4fe9c84e2 100644
--- a/test/spec/simd.wast
+++ b/test/spec/simd.wast
@@ -181,6 +181,10 @@
(func (export "f32x4.max") (param $0 v128) (param $1 v128) (result v128) (f32x4.max (local.get $0) (local.get $1)))
(func (export "f32x4.pmin") (param $0 v128) (param $1 v128) (result v128) (f32x4.pmin (local.get $0) (local.get $1)))
(func (export "f32x4.pmax") (param $0 v128) (param $1 v128) (result v128) (f32x4.pmax (local.get $0) (local.get $1)))
+ (func (export "f32x4.ceil") (param $0 v128) (result v128) (f32x4.ceil (local.get $0)))
+ (func (export "f32x4.floor") (param $0 v128) (result v128) (f32x4.floor (local.get $0)))
+ (func (export "f32x4.trunc") (param $0 v128) (result v128) (f32x4.trunc (local.get $0)))
+ (func (export "f32x4.nearest") (param $0 v128) (result v128) (f32x4.nearest (local.get $0)))
(func (export "f64x2.abs") (param $0 v128) (result v128) (f64x2.abs (local.get $0)))
(func (export "f64x2.neg") (param $0 v128) (result v128) (f64x2.neg (local.get $0)))
(func (export "f64x2.sqrt") (param $0 v128) (result v128) (f64x2.sqrt (local.get $0)))
@@ -194,6 +198,10 @@
(func (export "f64x2.max") (param $0 v128) (param $1 v128) (result v128) (f64x2.max (local.get $0) (local.get $1)))
(func (export "f64x2.pmin") (param $0 v128) (param $1 v128) (result v128) (f64x2.pmin (local.get $0) (local.get $1)))
(func (export "f64x2.pmax") (param $0 v128) (param $1 v128) (result v128) (f64x2.pmax (local.get $0) (local.get $1)))
+ (func (export "f64x2.ceil") (param $0 v128) (result v128) (f64x2.ceil (local.get $0)))
+ (func (export "f64x2.floor") (param $0 v128) (result v128) (f64x2.floor (local.get $0)))
+ (func (export "f64x2.trunc") (param $0 v128) (result v128) (f64x2.trunc (local.get $0)))
+ (func (export "f64x2.nearest") (param $0 v128) (result v128) (f64x2.nearest (local.get $0)))
(func (export "i32x4.trunc_sat_f32x4_s") (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_s (local.get $0)))
(func (export "i32x4.trunc_sat_f32x4_u") (param $0 v128) (result v128) (i32x4.trunc_sat_f32x4_u (local.get $0)))
(func (export "i64x2.trunc_sat_f64x2_s") (param $0 v128) (result v128) (i64x2.trunc_sat_f64x2_s (local.get $0)))
@@ -799,6 +807,18 @@
(assert_return (invoke "f32x4.max" (v128.const f32x4 -0 0 nan 5) (v128.const f32x4 0 -0 5 nan)) (v128.const f32x4 0 0 nan nan))
(assert_return (invoke "f32x4.pmin" (v128.const f32x4 -0 0 nan 5) (v128.const f32x4 0 -0 5 nan)) (v128.const f32x4 -0 0 nan 5))
(assert_return (invoke "f32x4.pmax" (v128.const f32x4 -0 0 nan 5) (v128.const f32x4 0 -0 5 nan)) (v128.const f32x4 -0 0 nan 5))
+(assert_return (invoke "f32x4.ceil" (v128.const f32x4 -0 0 infinity -infinity)) (v128.const f32x4 -0 0 infinity -infinity))
+(assert_return (invoke "f32x4.ceil" (v128.const f32x4 nan 42 0.5 -0.5)) (v128.const f32x4 nan 42 1 -0))
+(assert_return (invoke "f32x4.ceil" (v128.const f32x4 1.5 -1.5 4.2 -4.2)) (v128.const f32x4 2 -1 5 -4))
+(assert_return (invoke "f32x4.floor" (v128.const f32x4 -0 0 infinity -infinity)) (v128.const f32x4 -0 0 infinity -infinity))
+(assert_return (invoke "f32x4.floor" (v128.const f32x4 nan 42 0.5 -0.5)) (v128.const f32x4 nan 42 0 -1))
+(assert_return (invoke "f32x4.floor" (v128.const f32x4 1.5 -1.5 4.2 -4.2)) (v128.const f32x4 1 -2 4 -5))
+(assert_return (invoke "f32x4.trunc" (v128.const f32x4 -0 0 infinity -infinity)) (v128.const f32x4 -0 0 infinity -infinity))
+(assert_return (invoke "f32x4.trunc" (v128.const f32x4 nan 42 0.5 -0.5)) (v128.const f32x4 nan 42 0 -0))
+(assert_return (invoke "f32x4.trunc" (v128.const f32x4 1.5 -1.5 4.2 -4.2)) (v128.const f32x4 1 -1 4 -4))
+(assert_return (invoke "f32x4.nearest" (v128.const f32x4 -0 0 infinity -infinity)) (v128.const f32x4 -0 0 infinity -infinity))
+(assert_return (invoke "f32x4.nearest" (v128.const f32x4 nan 42 0.5 -0.5)) (v128.const f32x4 nan 42 0 -0))
+(assert_return (invoke "f32x4.nearest" (v128.const f32x4 1.5 -1.5 4.2 -4.2)) (v128.const f32x4 2 -2 4 -4))
;; f64x2 arithmetic
(assert_return (invoke "f64x2.abs" (v128.const f64x2 -0 nan)) (v128.const f64x2 0 nan))
@@ -824,6 +844,30 @@
(assert_return (invoke "f64x2.pmin" (v128.const f64x2 nan 5) (v128.const f64x2 5 nan)) (v128.const f64x2 nan 5))
(assert_return (invoke "f64x2.pmax" (v128.const f64x2 -0 0) (v128.const f64x2 0 -0)) (v128.const f64x2 -0 0))
(assert_return (invoke "f64x2.pmax" (v128.const f64x2 nan 5) (v128.const f64x2 5 nan)) (v128.const f64x2 nan 5))
+(assert_return (invoke "f64x2.ceil" (v128.const f64x2 -0 0)) (v128.const f64x2 -0 0))
+(assert_return (invoke "f64x2.ceil" (v128.const f64x2 infinity -infinity)) (v128.const f64x2 infinity -infinity))
+(assert_return (invoke "f64x2.ceil" (v128.const f64x2 nan 42)) (v128.const f64x2 nan 42))
+(assert_return (invoke "f64x2.ceil" (v128.const f64x2 0.5 -0.5)) (v128.const f64x2 1 -0))
+(assert_return (invoke "f64x2.ceil" (v128.const f64x2 1.5 -1.5)) (v128.const f64x2 2 -1))
+(assert_return (invoke "f64x2.ceil" (v128.const f64x2 4.2 -4.2)) (v128.const f64x2 5 -4))
+(assert_return (invoke "f64x2.floor" (v128.const f64x2 -0 0)) (v128.const f64x2 -0 0))
+(assert_return (invoke "f64x2.floor" (v128.const f64x2 infinity -infinity)) (v128.const f64x2 infinity -infinity))
+(assert_return (invoke "f64x2.floor" (v128.const f64x2 nan 42)) (v128.const f64x2 nan 42))
+(assert_return (invoke "f64x2.floor" (v128.const f64x2 0.5 -0.5)) (v128.const f64x2 0 -1))
+(assert_return (invoke "f64x2.floor" (v128.const f64x2 1.5 -1.5)) (v128.const f64x2 1 -2))
+(assert_return (invoke "f64x2.floor" (v128.const f64x2 4.2 -4.2)) (v128.const f64x2 4 -5))
+(assert_return (invoke "f64x2.trunc" (v128.const f64x2 -0 0)) (v128.const f64x2 -0 0))
+(assert_return (invoke "f64x2.trunc" (v128.const f64x2 infinity -infinity)) (v128.const f64x2 infinity -infinity))
+(assert_return (invoke "f64x2.trunc" (v128.const f64x2 nan 42)) (v128.const f64x2 nan 42))
+(assert_return (invoke "f64x2.trunc" (v128.const f64x2 0.5 -0.5)) (v128.const f64x2 0 -0))
+(assert_return (invoke "f64x2.trunc" (v128.const f64x2 1.5 -1.5)) (v128.const f64x2 1 -1))
+(assert_return (invoke "f64x2.trunc" (v128.const f64x2 4.2 -4.2)) (v128.const f64x2 4 -4))
+(assert_return (invoke "f64x2.nearest" (v128.const f64x2 -0 0)) (v128.const f64x2 -0 0))
+(assert_return (invoke "f64x2.nearest" (v128.const f64x2 infinity -infinity)) (v128.const f64x2 infinity -infinity))
+(assert_return (invoke "f64x2.nearest" (v128.const f64x2 nan 42)) (v128.const f64x2 nan 42))
+(assert_return (invoke "f64x2.nearest" (v128.const f64x2 0.5 -0.5)) (v128.const f64x2 0 -0))
+(assert_return (invoke "f64x2.nearest" (v128.const f64x2 1.5 -1.5)) (v128.const f64x2 2 -2))
+(assert_return (invoke "f64x2.nearest" (v128.const f64x2 4.2 -4.2)) (v128.const f64x2 4 -4))
;; conversions
(assert_return (invoke "i32x4.trunc_sat_f32x4_s" (v128.const f32x4 42 nan infinity -infinity)) (v128.const i32x4 42 0 2147483647 -2147483648))