summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-07-15 00:25:39 +0300
committerGitHub <noreply@github.com>2021-07-14 14:25:39 -0700
commitb842715392a6e18cfae6bdabce670a1d618611fc (patch)
tree3af0c298979293a822e0f1c0dc178b2c1a3ce127 /test
parentb68691e826a46d1b03b27c552b1f5b7f51f92665 (diff)
downloadbinaryen-b842715392a6e18cfae6bdabce670a1d618611fc.tar.gz
binaryen-b842715392a6e18cfae6bdabce670a1d618611fc.tar.bz2
binaryen-b842715392a6e18cfae6bdabce670a1d618611fc.zip
Implement q15MulrSatSI16x8 for interpreter (#3984)
Diffstat (limited to 'test')
-rw-r--r--test/spec/simd.wast9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/spec/simd.wast b/test/spec/simd.wast
index 0eda03fc5..9a76fec3b 100644
--- a/test/spec/simd.wast
+++ b/test/spec/simd.wast
@@ -151,7 +151,7 @@
(func (export "i16x8.max_s") (param $0 v128) (param $1 v128) (result v128) (i16x8.max_s (local.get $0) (local.get $1)))
(func (export "i16x8.max_u") (param $0 v128) (param $1 v128) (result v128) (i16x8.max_u (local.get $0) (local.get $1)))
(func (export "i16x8.avgr_u") (param $0 v128) (param $1 v128) (result v128) (i16x8.avgr_u (local.get $0) (local.get $1)))
- ;; TODO: Q15 rounding, saturating multiplication
+ (func (export "i16x8.q15mulr_sat_s") (param $0 v128) (param $1 v128) (result v128) (i16x8.q15mulr_sat_s (local.get $0) (local.get $1)))
;; TODO: extending multiplications
(func (export "i32x4.abs") (param $0 v128) (result v128) (i32x4.abs (local.get $0)))
(func (export "i32x4.neg") (param $0 v128) (result v128) (i32x4.neg (local.get $0)))
@@ -783,6 +783,13 @@
)
(v128.const i16x8 384 32641 32768 32768 17280 38912 64640 16384)
)
+(assert_return
+ (invoke "i16x8.q15mulr_sat_s"
+ (v128.const i16x8 -1 -16383 32765 65535 -32768 65535 -16385 -32768)
+ (v128.const i16x8 -1 -16384 1 -32768 -32768 1 -16384 -1)
+ )
+ (v128.const i16x8 0 8192 1 1 32767 0 8193 1)
+)
;; i32x4 arithmetic
(assert_return (invoke "i32x4.abs" (v128.const i32x4 0 1 0x80000000 0x80000001)) (v128.const i32x4 0 1 0x80000000 0x7fffffff))