1 ;; Test all the bit shift operators on major boundary values and all special values.
4 (func (export "i8x16.shl") (param $0 v128) (param $1 i32) (result v128) (i8x16.shl (local.get $0) (local.get $1)))
5 (func (export "i8x16.shr_s") (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_s (local.get $0) (local.get $1)))
6 (func (export "i8x16.shr_u") (param $0 v128) (param $1 i32) (result v128) (i8x16.shr_u (local.get $0) (local.get $1)))
8 (func (export "i16x8.shl") (param $0 v128) (param $1 i32) (result v128) (i16x8.shl (local.get $0) (local.get $1)))
9 (func (export "i16x8.shr_s") (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_s (local.get $0) (local.get $1)))
10 (func (export "i16x8.shr_u") (param $0 v128) (param $1 i32) (result v128) (i16x8.shr_u (local.get $0) (local.get $1)))
12 (func (export "i32x4.shl") (param $0 v128) (param $1 i32) (result v128) (i32x4.shl (local.get $0) (local.get $1)))
13 (func (export "i32x4.shr_s") (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_s (local.get $0) (local.get $1)))
14 (func (export "i32x4.shr_u") (param $0 v128) (param $1 i32) (result v128) (i32x4.shr_u (local.get $0) (local.get $1)))
16 (func (export "i64x2.shl") (param $0 v128) (param $1 i32) (result v128) (i64x2.shl (local.get $0) (local.get $1)))
17 (func (export "i64x2.shr_s") (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_s (local.get $0) (local.get $1)))
18 (func (export "i64x2.shr_u") (param $0 v128) (param $1 i32) (result v128) (i64x2.shr_u (local.get $0) (local.get $1)))
20 ;; shifting by a constant amount
22 (func (export "i8x16.shl_1") (param $0 v128) (result v128) (i8x16.shl (local.get $0) (i32.const 1)))
23 (func (export "i8x16.shr_u_8") (param $0 v128) (result v128) (i8x16.shr_u (local.get $0) (i32.const 8)))
24 (func (export "i8x16.shr_s_9") (param $0 v128) (result v128) (i8x16.shr_s (local.get $0) (i32.const 9)))
27 (func (export "i16x8.shl_1") (param $0 v128) (result v128) (i16x8.shl (local.get $0) (i32.const 1)))
28 (func (export "i16x8.shr_u_16") (param $0 v128) (result v128) (i16x8.shr_u (local.get $0) (i32.const 16)))
29 (func (export "i16x8.shr_s_17") (param $0 v128) (result v128) (i16x8.shr_s (local.get $0) (i32.const 17)))
32 (func (export "i32x4.shl_1") (param $0 v128) (result v128) (i32x4.shl (local.get $0) (i32.const 1)))
33 (func (export "i32x4.shr_u_32") (param $0 v128) (result v128) (i32x4.shr_u (local.get $0) (i32.const 32)))
34 (func (export "i32x4.shr_s_33") (param $0 v128) (result v128) (i32x4.shr_s (local.get $0) (i32.const 33)))
37 (func (export "i64x2.shl_1") (param $0 v128) (result v128) (i64x2.shl (local.get $0) (i32.const 1)))
38 (func (export "i64x2.shr_u_64") (param $0 v128) (result v128) (i64x2.shr_u (local.get $0) (i32.const 64)))
39 (func (export "i64x2.shr_s_65") (param $0 v128) (result v128) (i64x2.shr_s (local.get $0) (i32.const 65)))
43 ;; amount less than lane width
44 (assert_return (invoke "i8x16.shl" (v128.const i8x16 -128 -64 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D)
46 (v128.const i8x16 0 -128 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A))
47 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF 0xA0 0xB0 0xC0 0xD0 0xE0 0xF0 0x0A 0x0B 0x0C 0x0D)
49 (v128.const i8x16 0xA0 0xB0 0xC0 0xD0 0xE0 0xF0 0x00 0x00 0x00 0x00 0x00 0x00 0xA0 0xB0 0xC0 0xD0))
50 ;; amount is multiple of lane width
51 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
53 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
54 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
56 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
57 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
59 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
60 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
62 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
63 ;; amount greater than but not a multiple of lane width
64 (assert_return (invoke "i8x16.shl" (v128.const i8x16 -128 -64 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D)
66 (v128.const i8x16 0 -128 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A))
67 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
69 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
70 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
72 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
73 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
75 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
76 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
78 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
79 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
81 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
82 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
84 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
85 (assert_return (invoke "i8x16.shl" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
87 (v128.const i8x16 0 4 8 12 16 20 24 28 32 36 0x28 0x2C 0x30 0x34 0x38 0x3C))
89 ;; amount less than lane width
90 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 -128 -64 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D)
92 (v128.const i8x16 64 96 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06))
93 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF 0xA0 0xB0 0xC0 0xD0 0xE0 0xF0 0x0A 0x0B 0x0C 0x0D)
95 (v128.const i8x16 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x0A 0x0B 0x0C 0x0D 0x0E 0x0F 0x00 0x00 0x00 0x00))
96 ;; amount is multiple of lane width
97 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
99 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
100 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
102 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
103 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
105 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
106 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
108 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
109 ;; amount greater than but not a multiple of lane width
110 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 -128 -64 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D)
112 (v128.const i8x16 64 96 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06))
113 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
115 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
116 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
118 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
119 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
121 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
122 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
124 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
125 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
127 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
128 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
130 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
131 (assert_return (invoke "i8x16.shr_u" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
133 (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 0x02 0x02 0x03 0x03 0x03 0x03))
135 ;; amount less than lane width
136 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 -128 -64 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D)
138 (v128.const i8x16 192 224 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06))
139 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0xAA 0xBB 0xCC 0xDD 0xEE 0xFF 0xA0 0xB0 0xC0 0xD0 0xE0 0xF0 0x0A 0x0B 0x0C 0x0D)
141 (v128.const i8x16 0xFA 0xFB 0xFC 0xFD 0xFE 0xFF 0xFA 0xFB 0xFC 0xFD 0xFE 0xFF 0x00 0x00 0x00 0x00))
142 ;; amount is multiple of lane width
143 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
145 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
146 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
148 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
149 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
151 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
152 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
154 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
155 ;; amount greater than but not a multiple of lane width
156 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 -128 -64 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D)
158 (v128.const i8x16 192 224 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06))
159 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
161 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
162 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
164 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
165 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
167 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
168 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
170 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
171 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
173 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
174 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
176 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
177 (assert_return (invoke "i8x16.shr_s" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F)
179 (v128.const i8x16 0 0 0 0 1 1 1 1 2 2 0x02 0x02 0x03 0x03 0x03 0x03))
180 ;; shifting by a constant amount
181 (assert_return (invoke "i8x16.shl_1" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
182 (v128.const i8x16 0 2 4 6 8 10 12 14 16 18 0x14 0x16 0x18 0x1A 0x1C 0x1E))
183 (assert_return (invoke "i8x16.shr_u_8" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
184 (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
185 (assert_return (invoke "i8x16.shr_s_9" (v128.const i8x16 0 1 2 3 4 5 6 7 8 9 0x0A 0x0B 0x0C 0x0D 0x0e 0x0F))
186 (v128.const i8x16 0 0 1 1 2 2 3 3 4 4 0x05 0x05 0x06 0x06 0x07 0x07))
189 ;; amount less than lane width
190 (assert_return (invoke "i16x8.shl" (v128.const i16x8 -128 -64 0 1 2 3 4 5)
192 (v128.const i16x8 65280 65408 0 2 4 6 8 10))
193 (assert_return (invoke "i16x8.shl" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345)
195 (v128.const i16x8 49380 49380 49380 49380 49380 49380 49380 49380))
196 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234)
198 (v128.const i16x8 0x48d0 0x48d0 0x48d0 0x48d0 0x48d0 0x48d0 0x48d0 0x48d0))
199 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0xAABB 0xCCDD 0xEEFF 0xA0B0 0xC0D0 0xE0F0 0x0A0B 0x0C0D)
201 (v128.const i16x8 0xABB0 0xCDD0 0xEFF0 0xB00 0xD00 0xF00 0xA0B0 0xC0D0))
202 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
204 (v128.const i16x8 0 256 512 768 1024 1280 1536 1792))
205 ;; amount is multiple of lane width
206 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
208 (v128.const i16x8 0 1 2 3 4 5 6 7))
209 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
211 (v128.const i16x8 0 1 2 3 4 5 6 7))
212 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
214 (v128.const i16x8 0 1 2 3 4 5 6 7))
215 ;; amount greater than but not a multiple of lane width
216 (assert_return (invoke "i16x8.shl" (v128.const i16x8 -128 -64 0 1 2 3 4 5)
218 (v128.const i16x8 65280 65408 0 2 4 6 8 10))
219 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
221 (v128.const i16x8 0 2 4 6 8 10 12 14))
222 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
224 (v128.const i16x8 0 2 4 6 8 10 12 14))
225 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
227 (v128.const i16x8 0 2 4 6 8 10 12 14))
228 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
230 (v128.const i16x8 0 2 4 6 8 10 12 14))
231 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
233 (v128.const i16x8 0 2 4 6 8 10 12 14))
234 (assert_return (invoke "i16x8.shl" (v128.const i16x8 0 1 2 3 4 5 6 7)
236 (v128.const i16x8 0 4 8 12 16 20 24 28))
239 ;; amount less than lane width
240 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 -128 -64 0 1 2 3 4 5)
242 (v128.const i16x8 32704 32736 0 0 1 1 2 2))
243 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345)
245 (v128.const i16x8 3086 3086 3086 3086 3086 3086 3086 3086))
246 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB)
248 (v128.const i16x8 0x242a 0x242a 0x242a 0x242a 0x242a 0x242a 0x242a 0x242a))
249 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0xAABB 0xCCDD 0xEEFF 0xA0B0 0xC0D0 0xE0F0 0x0A0B 0x0C0D)
251 (v128.const i16x8 0xAAB 0xCCD 0xEEF 0xA0B 0xC0D 0xE0F 0x0A0 0x0C0))
252 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
254 (v128.const i16x8 0 0 0 0 0 0 0 0))
255 ;; amount is multiple of lane width
256 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
258 (v128.const i16x8 0 1 2 3 4 5 6 7))
259 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
261 (v128.const i16x8 0 1 2 3 4 5 6 7))
262 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
264 (v128.const i16x8 0 1 2 3 4 5 6 7))
265 ;; amount greater than but not a multiple of lane width
266 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 -128 -64 0 1 2 3 4 5)
268 (v128.const i16x8 32704 32736 0 0 1 1 2 2))
269 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
271 (v128.const i16x8 0 0 1 1 2 2 3 3))
272 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
274 (v128.const i16x8 0 0 1 1 2 2 3 3))
275 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
277 (v128.const i16x8 0 0 1 1 2 2 3 3))
278 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
280 (v128.const i16x8 0 0 1 1 2 2 3 3))
281 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
283 (v128.const i16x8 0 0 1 1 2 2 3 3))
284 (assert_return (invoke "i16x8.shr_u" (v128.const i16x8 0 1 2 3 4 5 6 7)
286 (v128.const i16x8 0 0 0 0 1 1 1 1))
289 ;; amount less than lane width
290 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 -128 -64 0 1 2 3 4 5)
292 (v128.const i16x8 65472 65504 0 0 1 1 2 2))
293 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 012_345 012_345 012_345 012_345 012_345 012_345 012_345 012_345)
295 (v128.const i16x8 3086 3086 3086 3086 3086 3086 3086 3086))
296 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB 0x0_90AB)
298 (v128.const i16x8 0xe42a 0xe42a 0xe42a 0xe42a 0xe42a 0xe42a 0xe42a 0xe42a))
299 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0xAABB 0xCCDD 0xEEFF 0xA0B0 0xC0D0 0xE0F0 0x0A0B 0x0C0D)
301 (v128.const i16x8 0xFAAB 0xFCCD 0xFEEF 0xFA0B 0xFC0D 0xFE0F 0x00A0 0x00C0))
302 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
304 (v128.const i16x8 0 0 0 0 0 0 0 0))
305 ;; amount is multiple of lane width
306 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
308 (v128.const i16x8 0 1 2 3 4 5 6 7))
309 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
311 (v128.const i16x8 0 1 2 3 4 5 6 7))
312 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
314 (v128.const i16x8 0 1 2 3 4 5 6 7))
315 ;; amount greater than but not a multiple of lane width
316 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 -128 -64 0 1 2 3 4 5)
318 (v128.const i16x8 65472 65504 0 0 1 1 2 2))
319 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
321 (v128.const i16x8 0 0 1 1 2 2 3 3))
322 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
324 (v128.const i16x8 0 0 1 1 2 2 3 3))
325 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
327 (v128.const i16x8 0 0 1 1 2 2 3 3))
328 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
330 (v128.const i16x8 0 0 1 1 2 2 3 3))
331 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
333 (v128.const i16x8 0 0 1 1 2 2 3 3))
334 (assert_return (invoke "i16x8.shr_s" (v128.const i16x8 0 1 2 3 4 5 6 7)
336 (v128.const i16x8 0 0 0 0 1 1 1 1))
338 ;; shifting by a constant amount
339 (assert_return (invoke "i16x8.shl_1" (v128.const i16x8 0 1 2 3 4 5 6 7))
340 (v128.const i16x8 0 2 4 6 8 10 12 14))
341 (assert_return (invoke "i16x8.shr_u_16" (v128.const i16x8 0 1 2 3 4 5 6 7))
342 (v128.const i16x8 0 1 2 3 4 5 6 7))
343 (assert_return (invoke "i16x8.shr_s_17" (v128.const i16x8 0 1 2 3 4 5 6 7))
344 (v128.const i16x8 0 0 1 1 2 2 3 3))
347 ;; amount less than lane width
348 (assert_return (invoke "i32x4.shl" (v128.const i32x4 -2147483648 -32768 0 0x0A0B0C0D)
350 (v128.const i32x4 0 4294901760 0 0x1416181A))
351 (assert_return (invoke "i32x4.shl" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
353 (v128.const i32x4 643304264 643304264 643304264 643304264))
354 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678 0x0_1234_5678)
356 (v128.const i32x4 0x48d159e0 0x48d159e0 0x48d159e0 0x48d159e0))
357 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0xAABBCCDD 0xEEFFA0B0 0xC0D0E0F0 0x0A0B0C0D)
359 (v128.const i32x4 0xABBCCDD0 0xEFFA0B00 0x0D0E0F00 0xA0B0C0D0))
360 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
362 (v128.const i32x4 0 256 0x00000E00 0x00000F00))
363 ;; amount is multiple of lane width
364 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
366 (v128.const i32x4 0 1 0x0E 0x0F))
367 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
369 (v128.const i32x4 0 1 0x0E 0x0F))
370 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
372 (v128.const i32x4 0 1 0x0E 0x0F))
373 ;; amount greater than but not a multiple of lane width
374 (assert_return (invoke "i32x4.shl" (v128.const i32x4 -2147483648 -32768 0 0x0A0B0C0D)
376 (v128.const i32x4 0 4294901760 0 0x1416181A))
377 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
379 (v128.const i32x4 0 2 0x1C 0x1E))
380 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
382 (v128.const i32x4 0 2 0x1C 0x1E))
383 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
385 (v128.const i32x4 0 2 0x1C 0x1E))
386 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
388 (v128.const i32x4 0 2 0x1C 0x1E))
389 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
391 (v128.const i32x4 0 2 0x1C 0x1E))
392 (assert_return (invoke "i32x4.shl" (v128.const i32x4 0 1 0x0E 0x0F)
394 (v128.const i32x4 0 4 0x38 0x3C))
397 ;; amount less than lane width
398 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 -2147483648 -32768 0x0000000C 0x0000000D)
400 (v128.const i32x4 1073741824 2147467264 0x00000006 0x00000006))
401 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
403 (v128.const i32x4 308641972 308641972 308641972 308641972))
404 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef)
406 (v128.const i32x4 0x242af37b 0x242af37b 0x242af37b 0x242af37b))
407 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0xAABBCCDD 0xEEFFA0B0 0xC0D0E0F0 0x0A0B0C0D)
409 (v128.const i32x4 0x0AABBCCD 0x0EEFFA0B 0x0C0D0E0F 0x00A0B0C0))
410 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
412 (v128.const i32x4 0 0 0x00000000 0x00000000))
413 ;; amount is multiple of lane width
414 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
416 (v128.const i32x4 0 1 0x0E 0x0F))
417 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
419 (v128.const i32x4 0 1 0x0E 0x0F))
420 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
422 (v128.const i32x4 0 1 0x0E 0x0F))
423 ;; amount greater than but not a multiple of lane width
424 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 -2147483648 -32768 0x0000000C 0x0000000D)
426 (v128.const i32x4 1073741824 2147467264 0x00000006 0x00000006))
427 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
429 (v128.const i32x4 0 0 0x07 0x07))
430 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
432 (v128.const i32x4 0 0 0x07 0x07))
433 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
435 (v128.const i32x4 0 0 0x07 0x07))
436 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
438 (v128.const i32x4 0 0 0x07 0x07))
439 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
441 (v128.const i32x4 0 0 0x07 0x07))
442 (assert_return (invoke "i32x4.shr_u" (v128.const i32x4 0 1 0x0E 0x0F)
444 (v128.const i32x4 0 0 0x03 0x03))
447 ;; amount less than lane width
448 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 -2147483648 -32768 0x0C 0x0D)
450 (v128.const i32x4 3221225472 4294950912 0x06 0x06))
451 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 01_234_567_890 01_234_567_890 01_234_567_890 01_234_567_890)
453 (v128.const i32x4 308641972 308641972 308641972 308641972))
454 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef 0x0_90AB_cdef)
456 (v128.const i32x4 0xe42af37b 0xe42af37b 0xe42af37b 0xe42af37b))
457 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0xAABBCCDD 0xEEFFA0B0 0xC0D0E0F0 0x0A0B0C0D)
459 (v128.const i32x4 0xfaabbccd 0xFEEFFA0B 0xFC0D0E0F 0x00A0B0C0))
460 ;; amount is multiple of lane width
461 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
463 (v128.const i32x4 0 0 0x00000000 0x00000000))
464 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
466 (v128.const i32x4 0 1 0x0E 0x0F))
467 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
469 (v128.const i32x4 0 1 0x0E 0x0F))
470 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
472 (v128.const i32x4 0 1 0x0E 0x0F))
473 ;; amount greater than but not a multiple of lane width
474 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 -2147483648 -32768 0x0C 0x0D)
476 (v128.const i32x4 3221225472 4294950912 0x06 0x06))
477 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
479 (v128.const i32x4 0 0 0x07 0x07))
480 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
482 (v128.const i32x4 0 0 0x07 0x07))
483 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
485 (v128.const i32x4 0 0 0x07 0x07))
486 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
488 (v128.const i32x4 0 0 0x07 0x07))
489 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
491 (v128.const i32x4 0 0 0x07 0x07))
492 (assert_return (invoke "i32x4.shr_s" (v128.const i32x4 0 1 0x0E 0x0F)
494 (v128.const i32x4 0 0 0x03 0x03))
496 ;; shifting by a constant amount
497 (assert_return (invoke "i32x4.shl_1" (v128.const i32x4 0 1 0x0E 0x0F))
498 (v128.const i32x4 0 2 28 30))
499 (assert_return (invoke "i32x4.shr_u_32" (v128.const i32x4 0 1 0x0E 0x0F))
500 (v128.const i32x4 0 1 0x0E 0x0F))
501 (assert_return (invoke "i32x4.shr_s_33" (v128.const i32x4 0 1 0x0E 0x0F))
502 (v128.const i32x4 0 0 7 7))
505 ;; amount less than lane width
506 (assert_return (invoke "i64x2.shl" (v128.const i64x2 -9223372036854775808 -2147483648)
508 (v128.const i64x2 0 18446744069414584320))
509 (assert_return (invoke "i64x2.shl" (v128.const i64x2 01_234_567_890_123_456_789 01_234_567_890_123_456_789)
511 (v128.const i64x2 4938271560493827156 4938271560493827156))
512 (assert_return (invoke "i64x2.shl" (v128.const i64x2 0x0_1234_5678_90AB_cdef 0x0_1234_5678_90AB_cdef)
514 (v128.const i64x2 0x48d159e242af37bc 0x48d159e242af37bc))
515 (assert_return (invoke "i64x2.shl" (v128.const i64x2 0xAABBCCDDEEFFA0B0 0xC0D0E0F00A0B0C0D)
517 (v128.const i64x2 0xABBCCDDEEFFA0B00 0xD0E0F00A0B0C0D0))
518 (assert_return (invoke "i64x2.shl" (v128.const i64x2 0xAABBCCDDEEFFA0B0 0xC0D0E0F00A0B0C0D)
520 (v128.const i64x2 0xBBCCDDEEFFA0B000 0xD0E0F00A0B0C0D00))
521 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
523 (v128.const i64x2 65536 0xF0000))
524 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
526 (v128.const i64x2 4294967296 0xF00000000))
527 ;; amount is multiple of lane width
528 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
530 (v128.const i64x2 1 0x0F))
531 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
533 (v128.const i64x2 1 0x0F))
534 ;; amount greater than but not a multiple of lane width
535 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
537 (v128.const i64x2 2 0x1E))
538 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
540 (v128.const i64x2 2 0x1E))
541 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
543 (v128.const i64x2 2 0x1E))
544 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
546 (v128.const i64x2 2 0x1E))
547 (assert_return (invoke "i64x2.shl" (v128.const i64x2 1 0x0F)
549 (v128.const i64x2 4 0x3C))
552 ;; amount less than lane width
553 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 -9223372036854775808 -2147483648)
555 (v128.const i64x2 4611686018427387904 9223372035781033984))
556 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 01_234_567_890_123_456_789 01_234_567_890_123_456_789)
558 (v128.const i64x2 308641972530864197 308641972530864197))
559 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 0x0_90AB_cdef_8765_4321 0x0_90AB_cdef_8765_4321)
561 (v128.const i64x2 0x242af37be1d950c8 0x242af37be1d950c8))
562 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 0xAABBCCDDEEFFA0B0 0xC0D0E0F00A0B0C0D)
564 (v128.const i64x2 0xAABBCCDDEEFFA0B 0xC0D0E0F00A0B0C0))
565 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 0xAABBCCDDEEFFA0B0 0xC0D0E0F00A0B0C0D)
567 (v128.const i64x2 0xAABBCCDDEEFFA0 0xC0D0E0F00A0B0C))
568 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
570 (v128.const i64x2 0 0x00))
571 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
573 (v128.const i64x2 0 0x00))
574 ;; amount is multiple of lane width
575 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
577 (v128.const i64x2 1 0x0F))
578 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
580 (v128.const i64x2 1 0x0F))
581 ;; amount greater than but not a multiple of lane width
582 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
584 (v128.const i64x2 0 0x07))
585 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
587 (v128.const i64x2 0 0x07))
588 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
590 (v128.const i64x2 0 0x07))
591 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 1 0x0F)
593 (v128.const i64x2 0 0x07))
594 (assert_return (invoke "i64x2.shr_u" (v128.const i64x2 0 0x0F)
596 (v128.const i64x2 0 0x03))
599 ;; amount less than lane width
600 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 -9223372036854775808 -2147483648)
602 (v128.const i64x2 13835058055282163712 18446744072635809792))
603 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 01_234_567_890_123_456_789 01_234_567_890_123_456_789)
605 (v128.const i64x2 308641972530864197 308641972530864197))
606 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 0x0_90AB_cdef_8765_4321 0x0_90AB_cdef_8765_4321)
608 (v128.const i64x2 0xe42af37be1d950c8 0xe42af37be1d950c8))
609 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 0xAABBCCDDEEFFA0B0 0xC0D0E0F00A0B0C0D)
611 (v128.const i64x2 0xFAABBCCDDEEFFA0B 0xFC0D0E0F00A0B0C0))
612 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 0xFFAABBCCDDEEFFA0 0xC0D0E0F00A0B0C0D)
614 (v128.const i64x2 0xFFFFAABBCCDDEEFF 0xFFC0D0E0F00A0B0C))
615 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
617 (v128.const i64x2 0 0x00))
618 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
620 (v128.const i64x2 0 0x00))
621 ;; amount is multiple of lane width
622 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
624 (v128.const i64x2 1 0x0F))
625 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
627 (v128.const i64x2 1 0x0F))
628 ;; amount greater than but not a multiple of lane width
629 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 -9223372036854775808 -2147483648)
631 (v128.const i64x2 13835058055282163712 18446744072635809792))
632 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 0x0C 0x0D)
634 (v128.const i64x2 0x06 0x06))
635 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
637 (v128.const i64x2 0 0x07))
638 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
640 (v128.const i64x2 0 0x07))
641 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
643 (v128.const i64x2 0 0x07))
644 (assert_return (invoke "i64x2.shr_s" (v128.const i64x2 1 0x0F)
646 (v128.const i64x2 0 0x03))
648 ;; shifting by a constant amount
649 (assert_return (invoke "i64x2.shl_1" (v128.const i64x2 1 0x0F))
650 (v128.const i64x2 2 0x1E))
651 (assert_return (invoke "i64x2.shr_u_64" (v128.const i64x2 1 0x0F))
652 (v128.const i64x2 1 0x0F))
653 (assert_return (invoke "i64x2.shr_s_65" (v128.const i64x2 1 0x0F))
654 (v128.const i64x2 0 0x07))
659 (func (export "i8x16.shl-in-block")
664 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
670 (func (export "i8x16.shr_s-in-block")
675 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
681 (func (export "i8x16.shr_u-in-block")
686 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
692 (func (export "i16x8.shl-in-block")
697 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
703 (func (export "i16x8.shr_s-in-block")
708 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
714 (func (export "i16x8.shr_u-in-block")
719 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
725 (func (export "i32x4.shl-in-block")
730 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
736 (func (export "i32x4.shr_s-in-block")
741 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
747 (func (export "i32x4.shr_u-in-block")
752 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
758 (func (export "i64x2.shl-in-block")
763 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
769 (func (export "i64x2.shr_s-in-block")
774 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
780 (func (export "i64x2.shr_u-in-block")
785 (block (result v128) (v128.load (i32.const 0))) (i32.const 1)
791 (func (export "nested-i8x16.shl")
796 (v128.load (i32.const 0)) (i32.const 1)
804 (func (export "nested-i8x16.shr_s")
809 (v128.load (i32.const 0)) (i32.const 1)
817 (func (export "nested-i8x16.shr_u")
822 (v128.load (i32.const 0)) (i32.const 1)
830 (func (export "nested-i16x8.shl")
835 (v128.load (i32.const 0)) (i32.const 1)
843 (func (export "nested-i16x8.shr_s")
848 (v128.load (i32.const 0)) (i32.const 1)
856 (func (export "nested-i16x8.shr_u")
861 (v128.load (i32.const 0)) (i32.const 1)
869 (func (export "nested-i32x4.shl")
874 (v128.load (i32.const 0)) (i32.const 1)
882 (func (export "nested-i32x4.shr_s")
887 (v128.load (i32.const 0)) (i32.const 1)
895 (func (export "nested-i32x4.shr_u")
900 (v128.load (i32.const 0)) (i32.const 1)
908 (func (export "nested-i64x2.shl")
913 (v128.load (i32.const 0)) (i32.const 1)
921 (func (export "nested-i64x2.shr_s")
926 (v128.load (i32.const 0)) (i32.const 1)
934 (func (export "nested-i64x2.shr_u")
939 (v128.load (i32.const 0)) (i32.const 1)
949 (assert_return (invoke "i8x16.shl-in-block"))
950 (assert_return (invoke "i8x16.shr_s-in-block"))
951 (assert_return (invoke "i8x16.shr_u-in-block"))
952 (assert_return (invoke "i16x8.shl-in-block"))
953 (assert_return (invoke "i16x8.shr_s-in-block"))
954 (assert_return (invoke "i16x8.shr_u-in-block"))
955 (assert_return (invoke "i32x4.shl-in-block"))
956 (assert_return (invoke "i32x4.shr_s-in-block"))
957 (assert_return (invoke "i32x4.shr_u-in-block"))
958 (assert_return (invoke "i64x2.shl-in-block"))
959 (assert_return (invoke "i64x2.shr_s-in-block"))
960 (assert_return (invoke "i64x2.shr_u-in-block"))
961 (assert_return (invoke "nested-i8x16.shl"))
962 (assert_return (invoke "nested-i8x16.shr_s"))
963 (assert_return (invoke "nested-i8x16.shr_u"))
964 (assert_return (invoke "nested-i16x8.shl"))
965 (assert_return (invoke "nested-i16x8.shr_s"))
966 (assert_return (invoke "nested-i16x8.shr_u"))
967 (assert_return (invoke "nested-i32x4.shl"))
968 (assert_return (invoke "nested-i32x4.shr_s"))
969 (assert_return (invoke "nested-i32x4.shr_u"))
970 (assert_return (invoke "nested-i64x2.shl"))
971 (assert_return (invoke "nested-i64x2.shr_s"))
972 (assert_return (invoke "nested-i64x2.shr_u"))
976 (assert_invalid (module (func (result v128) (i8x16.shl (i32.const 0) (i32.const 0)))) "type mismatch")
977 (assert_invalid (module (func (result v128) (i8x16.shr_s (i32.const 0) (i32.const 0)))) "type mismatch")
978 (assert_invalid (module (func (result v128) (i8x16.shr_u (i32.const 0) (i32.const 0)))) "type mismatch")
979 (assert_invalid (module (func (result v128) (i16x8.shl (i32.const 0) (i32.const 0)))) "type mismatch")
980 (assert_invalid (module (func (result v128) (i16x8.shr_s (i32.const 0) (i32.const 0)))) "type mismatch")
981 (assert_invalid (module (func (result v128) (i16x8.shr_u (i32.const 0) (i32.const 0)))) "type mismatch")
982 (assert_invalid (module (func (result v128) (i32x4.shl (i32.const 0) (i32.const 0)))) "type mismatch")
983 (assert_invalid (module (func (result v128) (i32x4.shr_s (i32.const 0) (i32.const 0)))) "type mismatch")
984 (assert_invalid (module (func (result v128) (i32x4.shr_u (i32.const 0) (i32.const 0)))) "type mismatch")
985 (assert_invalid (module (func (result v128) (i64x2.shl (i32.const 0) (i32.const 0)))) "type mismatch")
986 (assert_invalid (module (func (result v128) (i64x2.shr_s (i32.const 0) (i32.const 0)))) "type mismatch")
987 (assert_invalid (module (func (result v128) (i64x2.shr_u (i32.const 0) (i32.const 0)))) "type mismatch")
991 (assert_malformed (module quote "(memory 1) (func (result v128) (i8x16.shl_s (v128.const i32x4 0 0 0 0)))") "unknown operator")
992 (assert_malformed (module quote "(memory 1) (func (result v128) (i8x16.shl_r (v128.const i32x4 0 0 0 0)))") "unknown operator")
993 (assert_malformed (module quote "(memory 1) (func (result v128) (i8x16.shr (v128.const i32x4 0 0 0 0)))") "unknown operator")
994 (assert_malformed (module quote "(memory 1) (func (result v128) (i16x8.shl_s (v128.const i32x4 0 0 0 0)))") "unknown operator")
995 (assert_malformed (module quote "(memory 1) (func (result v128) (i16x8.shl_r (v128.const i32x4 0 0 0 0)))") "unknown operator")
996 (assert_malformed (module quote "(memory 1) (func (result v128) (i16x8.shr (v128.const i32x4 0 0 0 0)))") "unknown operator")
997 (assert_malformed (module quote "(memory 1) (func (result v128) (i32x4.shl_s (v128.const i32x4 0 0 0 0)))") "unknown operator")
998 (assert_malformed (module quote "(memory 1) (func (result v128) (i32x4.shl_r (v128.const i32x4 0 0 0 0)))") "unknown operator")
999 (assert_malformed (module quote "(memory 1) (func (result v128) (i32x4.shr (v128.const i32x4 0 0 0 0)))") "unknown operator")
1000 (assert_malformed (module quote "(memory 1) (func (result v128) (i64x2.shl_s (v128.const i32x4 0 0 0 0)))") "unknown operator")
1001 (assert_malformed (module quote "(memory 1) (func (result v128) (i64x2.shl_r (v128.const i32x4 0 0 0 0)))") "unknown operator")
1002 (assert_malformed (module quote "(memory 1) (func (result v128) (i64x2.shr (v128.const i32x4 0 0 0 0)))") "unknown operator")
1003 (assert_malformed (module quote "(memory 1) (func (result v128) (f32x4.shl (v128.const i32x4 0 0 0 0)))") "unknown operator")
1004 (assert_malformed (module quote "(memory 1) (func (result v128) (f32x4.shr_s (v128.const i32x4 0 0 0 0)))") "unknown operator")
1005 (assert_malformed (module quote "(memory 1) (func (result v128) (f32x4.shr_u (v128.const i32x4 0 0 0 0)))") "unknown operator")
1007 ;; Test operation with empty argument
1011 (func $i8x16.shl-1st-arg-empty (result v128)
1012 (i8x16.shl (i32.const 0))
1019 (func $i8x16.shl-last-arg-empty (result v128)
1020 (i8x16.shl (v128.const i8x16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0))
1027 (func $i8x16.shl-arg-empty (result v128)
1035 (func $i16x8.shr_u-1st-arg-empty (result v128)
1036 (i16x8.shr_u (i32.const 0))
1043 (func $i16x8.shr_u-last-arg-empty (result v128)
1044 (i16x8.shr_u (v128.const i16x8 0 0 0 0 0 0 0 0))
1051 (func $i16x8.shr_u-arg-empty (result v128)
1059 (func $i32x4.shr_s-1st-arg-empty (result v128)
1060 (i32x4.shr_s (i32.const 0))
1067 (func $i32x4.shr_s-last-arg-empty (result v128)
1068 (i32x4.shr_s (v128.const i32x4 0 0 0 0))
1075 (func $i32x4.shr_s-arg-empty (result v128)
1083 (func $i64x2.shl-1st-arg-empty (result v128)
1084 (i64x2.shl (i32.const 0))
1091 (func $i64x2.shr_u-last-arg-empty (result v128)
1092 (i64x2.shr_u (v128.const i64x2 0 0))
1099 (func $i64x2.shr_s-arg-empty (result v128)