summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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))