1 ;; Tests for i32x4 arithmetic operations on major boundary values and all special values.
5 (func (export "i32x4.dot_i16x8_s") (param v128 v128) (result v128) (i32x4.dot_i16x8_s (local.get 0) (local.get 1)))
10 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
11 (v128.const i16x8 0 0 0 0 0 0 0 0))
12 (v128.const i32x4 0 0 0 0))
13 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
14 (v128.const i16x8 1 1 1 1 1 1 1 1))
15 (v128.const i32x4 0 0 0 0))
16 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 1 1 1 1 1 1 1 1)
17 (v128.const i16x8 1 1 1 1 1 1 1 1))
18 (v128.const i32x4 2 2 2 2))
19 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 0 0 0 0 0 0 0 0)
20 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
21 (v128.const i32x4 0 0 0 0))
22 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 1 1 1 1 1 1 1 1)
23 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
24 (v128.const i32x4 -2 -2 -2 -2))
25 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1)
26 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
27 (v128.const i32x4 2 2 2 2))
28 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 16383 16383 16383 16383 16383 16383 16383 16383)
29 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384))
30 (v128.const i32x4 536838144 536838144 536838144 536838144))
31 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384)
32 (v128.const i16x8 16384 16384 16384 16384 16384 16384 16384 16384))
33 (v128.const i32x4 536870912 536870912 536870912 536870912))
34 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -16383 -16383 -16383 -16383 -16383 -16383 -16383 -16383)
35 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384))
36 (v128.const i32x4 536838144 536838144 536838144 536838144))
37 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384)
38 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384))
39 (v128.const i32x4 536870912 536870912 536870912 536870912))
40 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -16385 -16385 -16385 -16385 -16385 -16385 -16385 -16385)
41 (v128.const i16x8 -16384 -16384 -16384 -16384 -16384 -16384 -16384 -16384))
42 (v128.const i32x4 536903680 536903680 536903680 536903680))
43 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 32765 32765 32765 32765 32765 32765 32765 32765)
44 (v128.const i16x8 1 1 1 1 1 1 1 1))
45 (v128.const i32x4 65530 65530 65530 65530))
46 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 32766 32766 32766 32766 32766 32766 32766 32766)
47 (v128.const i16x8 1 1 1 1 1 1 1 1))
48 (v128.const i32x4 65532 65532 65532 65532))
49 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 32768 32768 32768 32768 32768 32768 32768 32768)
50 (v128.const i16x8 1 1 1 1 1 1 1 1))
51 (v128.const i32x4 -65536 -65536 -65536 -65536))
52 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -32766 -32766 -32766 -32766 -32766 -32766 -32766 -32766)
53 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
54 (v128.const i32x4 65532 65532 65532 65532))
55 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767)
56 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
57 (v128.const i32x4 65534 65534 65534 65534))
58 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)
59 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
60 (v128.const i32x4 65536 65536 65536 65536))
61 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767)
62 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767))
63 (v128.const i32x4 2147352578 2147352578 2147352578 2147352578))
64 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)
65 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
66 (v128.const i32x4 2147483648 2147483648 2147483648 2147483648))
67 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768)
68 (v128.const i16x8 -32767 -32767 -32767 -32767 -32767 -32767 -32767 -32767))
69 (v128.const i32x4 2147418112 2147418112 2147418112 2147418112))
70 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
71 (v128.const i16x8 0 0 0 0 0 0 0 0))
72 (v128.const i32x4 0 0 0 0))
73 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
74 (v128.const i16x8 1 1 1 1 1 1 1 1))
75 (v128.const i32x4 -2 -2 -2 -2))
76 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
77 (v128.const i16x8 -1 -1 -1 -1 -1 -1 -1 -1))
78 (v128.const i32x4 2 2 2 2))
79 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
80 (v128.const i16x8 32767 32767 32767 32767 32767 32767 32767 32767))
81 (v128.const i32x4 -65534 -65534 -65534 -65534))
82 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
83 (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768))
84 (v128.const i32x4 65536 65536 65536 65536))
85 (assert_return (invoke "i32x4.dot_i16x8_s" (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535)
86 (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535))
87 (v128.const i32x4 2 2 2 2))
90 (assert_invalid (module (func (result v128) (i32x4.dot_i16x8_s (i32.const 0) (f32.const 0.0)))) "type mismatch")
92 ;; Test operation with empty argument
96 (func $i32x4.dot_i16x8_s-1st-arg-empty (result v128)
97 (i32x4.dot_i16x8_s (v128.const i32x4 0 0 0 0))
104 (func $i32x4.dot_i16x8_s-arg-empty (result v128)