...
1;; v128.const normal parameter (e.g. (i8x16, i16x8 i32x4, f32x4))
2
3(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF) drop))
4(module (func (v128.const i8x16 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) drop))
5(module (func (v128.const i8x16 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255) drop))
6(module (func (v128.const i8x16 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128 -128) drop))
7(module (func (v128.const i16x8 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF 0xFFFF) drop))
8(module (func (v128.const i16x8 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000 -0x8000) drop))
9(module (func (v128.const i16x8 65535 65535 65535 65535 65535 65535 65535 65535) drop))
10(module (func (v128.const i16x8 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768) drop))
11(module (func (v128.const i16x8 65_535 65_535 65_535 65_535 65_535 65_535 65_535 65_535) drop))
12(module (func (v128.const i16x8 -32_768 -32_768 -32_768 -32_768 -32_768 -32_768 -32_768 -32_768) drop))
13(module (func (v128.const i16x8 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45 0_123_45) drop))
14(module (func (v128.const i16x8 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234 0x0_1234) drop))
15(module (func (v128.const i32x4 0xffffffff 0xffffffff 0xffffffff 0xffffffff) drop))
16(module (func (v128.const i32x4 -0x80000000 -0x80000000 -0x80000000 -0x80000000) drop))
17(module (func (v128.const i32x4 4294967295 4294967295 4294967295 4294967295) drop))
18(module (func (v128.const i32x4 -2147483648 -2147483648 -2147483648 -2147483648) drop))
19(module (func (v128.const i32x4 0xffff_ffff 0xffff_ffff 0xffff_ffff 0xffff_ffff) drop))
20(module (func (v128.const i32x4 -0x8000_0000 -0x8000_0000 -0x8000_0000 -0x8000_0000) drop))
21(module (func (v128.const i32x4 4_294_967_295 4_294_967_295 4_294_967_295 4_294_967_295) drop))
22(module (func (v128.const i32x4 -2_147_483_648 -2_147_483_648 -2_147_483_648 -2_147_483_648) drop))
23(module (func (v128.const i32x4 0_123_456_789 0_123_456_789 0_123_456_789 0_123_456_789) drop))
24(module (func (v128.const i32x4 0x0_9acf_fBDF 0x0_9acf_fBDF 0x0_9acf_fBDF 0x0_9acf_fBDF) drop))
25(module (func (v128.const i64x2 0xffffffffffffffff 0xffffffffffffffff) drop))
26(module (func (v128.const i64x2 -0x8000000000000000 -0x8000000000000000) drop))
27(module (func (v128.const i64x2 18446744073709551615 18446744073709551615) drop))
28(module (func (v128.const i64x2 -9223372036854775808 -9223372036854775808) drop))
29(module (func (v128.const i64x2 0xffff_ffff_ffff_ffff 0xffff_ffff_ffff_ffff) drop))
30(module (func (v128.const i64x2 -0x8000_0000_0000_0000 -0x8000_0000_0000_0000) drop))
31(module (func (v128.const i64x2 18_446_744_073_709_551_615 18_446_744_073_709_551_615) drop))
32(module (func (v128.const i64x2 -9_223_372_036_854_775_808 -9_223_372_036_854_775_808) drop))
33(module (func (v128.const i64x2 0_123_456_789 0_123_456_789) drop))
34(module (func (v128.const i64x2 0x0125_6789_ADEF_bcef 0x0125_6789_ADEF_bcef) drop))
35(module (func (v128.const f32x4 0x1p127 0x1p127 0x1p127 0x1p127) drop))
36(module (func (v128.const f32x4 -0x1p127 -0x1p127 -0x1p127 -0x1p127) drop))
37(module (func (v128.const f32x4 1e38 1e38 1e38 1e38) drop))
38(module (func (v128.const f32x4 -1e38 -1e38 -1e38 -1e38) drop))
39(module (func (v128.const f32x4 340282356779733623858607532500980858880 340282356779733623858607532500980858880
40 340282356779733623858607532500980858880 340282356779733623858607532500980858880) drop))
41(module (func (v128.const f32x4 -340282356779733623858607532500980858880 -340282356779733623858607532500980858880
42 -340282356779733623858607532500980858880 -340282356779733623858607532500980858880) drop))
43(module (func (v128.const f32x4 nan:0x1 nan:0x1 nan:0x1 nan:0x1) drop))
44(module (func (v128.const f32x4 nan:0x7f_ffff nan:0x7f_ffff nan:0x7f_ffff nan:0x7f_ffff) drop))
45(module (func (v128.const f32x4 0123456789 0123456789 0123456789 0123456789) drop))
46(module (func (v128.const f32x4 0123456789e019 0123456789e019 0123456789e019 0123456789e019) drop))
47(module (func (v128.const f32x4 0123456789e+019 0123456789e+019 0123456789e+019 0123456789e+019) drop))
48(module (func (v128.const f32x4 0123456789e-019 0123456789e-019 0123456789e-019 0123456789e-019) drop))
49(module (func (v128.const f32x4 0123456789. 0123456789. 0123456789. 0123456789.) drop))
50(module (func (v128.const f32x4 0123456789.e019 0123456789.e019 0123456789.e019 0123456789.e019) drop))
51(module (func (v128.const f32x4 0123456789.e+019 0123456789.e+019 0123456789.e+019 0123456789.e+019) drop))
52(module (func (v128.const f32x4 0123456789.e-019 0123456789.e-019 0123456789.e-019 0123456789.e-019) drop))
53(module (func (v128.const f32x4 0123456789.0123456789 0123456789.0123456789 0123456789.0123456789 0123456789.0123456789) drop))
54(module (func (v128.const f32x4 0123456789.0123456789e019 0123456789.0123456789e019 0123456789.0123456789e019 0123456789.0123456789e019) drop))
55(module (func (v128.const f32x4 0123456789.0123456789e+019 0123456789.0123456789e+019 0123456789.0123456789e+019 0123456789.0123456789e+019) drop))
56(module (func (v128.const f32x4 0123456789.0123456789e-019 0123456789.0123456789e-019 0123456789.0123456789e-019 0123456789.0123456789e-019) drop))
57(module (func (v128.const f32x4 0x0123456789ABCDEF 0x0123456789ABCDEF 0x0123456789ABCDEF 0x0123456789ABCDEF) drop))
58(module (func (v128.const f32x4 0x0123456789ABCDEFp019 0x0123456789ABCDEFp019 0x0123456789ABCDEFp019 0x0123456789ABCDEFp019) drop))
59(module (func (v128.const f32x4 0x0123456789ABCDEFp+019 0x0123456789ABCDEFp+019 0x0123456789ABCDEFp+019 0x0123456789ABCDEFp+019) drop))
60(module (func (v128.const f32x4 0x0123456789ABCDEFp-019 0x0123456789ABCDEFp-019 0x0123456789ABCDEFp-019 0x0123456789ABCDEFp-019) drop))
61(module (func (v128.const f32x4 0x0123456789ABCDEF. 0x0123456789ABCDEF. 0x0123456789ABCDEF. 0x0123456789ABCDEF.) drop))
62(module (func (v128.const f32x4 0x0123456789ABCDEF.p019 0x0123456789ABCDEF.p019 0x0123456789ABCDEF.p019 0x0123456789ABCDEF.p019) drop))
63(module (func (v128.const f32x4 0x0123456789ABCDEF.p+019 0x0123456789ABCDEF.p+019 0x0123456789ABCDEF.p+019 0x0123456789ABCDEF.p+019) drop))
64(module (func (v128.const f32x4 0x0123456789ABCDEF.p-019 0x0123456789ABCDEF.p-019 0x0123456789ABCDEF.p-019 0x0123456789ABCDEF.p-019) drop))
65(module (func (v128.const f32x4 0x0123456789ABCDEF.019aF 0x0123456789ABCDEF.019aF 0x0123456789ABCDEF.019aF 0x0123456789ABCDEF.019aF) drop))
66(module (func (v128.const f32x4 0x0123456789ABCDEF.019aFp019 0x0123456789ABCDEF.019aFp019 0x0123456789ABCDEF.019aFp019 0x0123456789ABCDEF.019aFp019) drop))
67(module (func (v128.const f32x4 0x0123456789ABCDEF.019aFp+019 0x0123456789ABCDEF.019aFp+019 0x0123456789ABCDEF.019aFp+019 0x0123456789ABCDEF.019aFp+019) drop))
68(module (func (v128.const f32x4 0x0123456789ABCDEF.019aFp-019 0x0123456789ABCDEF.019aFp-019 0x0123456789ABCDEF.019aFp-019 0x0123456789ABCDEF.019aFp-019) drop))
69(module (func (v128.const f64x2 0x1p1023 0x1p1023) drop))
70(module (func (v128.const f64x2 -0x1p1023 -0x1p1023) drop))
71(module (func (v128.const f64x2 1e308 1e308) drop))
72(module (func (v128.const f64x2 -1e308 -1e308) drop))
73(module (func (v128.const f64x2 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368
74 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))
75(module (func (v128.const f64x2 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368
76 -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))
77(module (func (v128.const f64x2 nan:0x1 nan:0x1) drop))
78(module (func (v128.const f64x2 nan:0xf_ffff_ffff_ffff nan:0xf_ffff_ffff_ffff) drop))
79(module (func (v128.const f64x2 0123456789 0123456789) drop))
80(module (func (v128.const f64x2 0123456789e019 0123456789e019) drop))
81(module (func (v128.const f64x2 0123456789e+019 0123456789e+019) drop))
82(module (func (v128.const f64x2 0123456789e-019 0123456789e-019) drop))
83(module (func (v128.const f64x2 0123456789. 0123456789.) drop))
84(module (func (v128.const f64x2 0123456789.e019 0123456789.e019) drop))
85(module (func (v128.const f64x2 0123456789.e+019 0123456789.e+019) drop))
86(module (func (v128.const f64x2 0123456789.e-019 0123456789.e-019) drop))
87(module (func (v128.const f64x2 0123456789.0123456789 0123456789.0123456789) drop))
88(module (func (v128.const f64x2 0123456789.0123456789e019 0123456789.0123456789e019) drop))
89(module (func (v128.const f64x2 0123456789.0123456789e+019 0123456789.0123456789e+019) drop))
90(module (func (v128.const f64x2 0123456789.0123456789e-019 0123456789.0123456789e-019) drop))
91(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef 0x0123456789ABCDEFabcdef) drop))
92(module (func (v128.const f64x2 0x0123456789ABCDEFabcdefp019 0x0123456789ABCDEFabcdefp019) drop))
93(module (func (v128.const f64x2 0x0123456789ABCDEFabcdefp+019 0x0123456789ABCDEFabcdefp+019) drop))
94(module (func (v128.const f64x2 0x0123456789ABCDEFabcdefp-019 0x0123456789ABCDEFabcdefp-019) drop))
95(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef. 0x0123456789ABCDEFabcdef.) drop))
96(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.p019 0x0123456789ABCDEFabcdef.p019) drop))
97(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.p+019 0x0123456789ABCDEFabcdef.p+019) drop))
98(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.p-019 0x0123456789ABCDEFabcdef.p-019) drop))
99(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef) drop))
100(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019) drop))
101(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019) drop))
102(module (func (v128.const f64x2 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019) drop))
103
104;; Non-splat cases
105
106(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
107 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) drop))
108(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 255 255 255 255
109 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80 -0x80) drop))
110(module (func (v128.const i8x16 0xFF 0xFF 0xFF 0xFF 255 255 255 255
111 -0x80 -0x80 -0x80 -0x80 -128 -128 -128 -128) drop))
112(module (func (v128.const i16x8 0xFF 0xFF 0xFF 0xFF -0x8000 -0x8000 -0x8000 -0x8000) drop))
113(module (func (v128.const i16x8 0xFF 0xFF 65535 65535 -0x8000 -0x8000 -0x8000 -0x8000) drop))
114(module (func (v128.const i16x8 0xFF 0xFF 65535 65535 -0x8000 -0x8000 -32768 -32768) drop))
115(module (func (v128.const i32x4 0xffffffff 0xffffffff -0x80000000 -0x80000000) drop))
116(module (func (v128.const i32x4 0xffffffff 4294967295 -0x80000000 -0x80000000) drop))
117(module (func (v128.const i32x4 0xffffffff 4294967295 -0x80000000 -2147483648) drop))
118(module (func (v128.const f32x4 0x1p127 0x1p127 -0x1p127 -1e38) drop))
119(module (func (v128.const f32x4 0x1p127 340282356779733623858607532500980858880 -1e38 -340282356779733623858607532500980858880) drop))
120(module (func (v128.const f32x4 nan -nan inf -inf) drop))
121(module (func (v128.const i64x2 0xffffffffffffffff 0x8000000000000000) drop))
122(module (func (v128.const i64x2 0xffffffffffffffff -9223372036854775808) drop))
123(module (func (v128.const f64x2 0x1p1023 -1e308) drop))
124(module (func (v128.const f64x2 nan -inf) drop))
125
126;; Constant out of range (int literal is too large)
127
128(module (memory 1))
129(assert_malformed
130 (module quote "(func (v128.const i8x16 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100 0x100) drop)")
131 "constant out of range"
132)
133(assert_malformed
134 (module quote "(func (v128.const i8x16 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81 -0x81) drop)")
135 "constant out of range"
136)
137(assert_malformed
138 (module quote "(func (v128.const i8x16 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256) drop)")
139 "constant out of range"
140)
141(assert_malformed
142 (module quote "(func (v128.const i8x16 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129 -129) drop)")
143 "constant out of range"
144)
145(assert_malformed
146 (module quote "(func (v128.const i16x8 0x10000 0x10000 0x10000 0x10000 0x10000 0x10000 0x10000 0x10000) drop)")
147 "constant out of range"
148)
149(assert_malformed
150 (module quote "(func (v128.const i16x8 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001 -0x8001) drop)")
151 "constant out of range"
152)
153(assert_malformed
154 (module quote "(func (v128.const i16x8 65536 65536 65536 65536 65536 65536 65536 65536) drop)")
155 "constant out of range"
156)
157(assert_malformed
158 (module quote "(func (v128.const i16x8 -32769 -32769 -32769 -32769 -32769 -32769 -32769 -32769) drop)")
159 "constant out of range"
160)
161(assert_malformed
162 (module quote "(func (v128.const i32x4 0x100000000 0x100000000 0x100000000 0x100000000) drop)")
163 "constant out of range"
164)
165(assert_malformed
166 (module quote "(func (v128.const i32x4 -0x80000001 -0x80000001 -0x80000001 -0x80000001) drop)")
167 "constant out of range"
168)
169(assert_malformed
170 (module quote "(func (v128.const i32x4 4294967296 4294967296 4294967296 4294967296) drop)")
171 "constant out of range"
172)
173(assert_malformed
174 (module quote "(func (v128.const i32x4 -2147483649 -2147483649 -2147483649 -2147483649) drop)")
175 "constant out of range"
176)
177(assert_malformed
178 (module quote "(func (v128.const f32x4 0x1p128 0x1p128 0x1p128 0x1p128) drop)")
179 "constant out of range"
180)
181(assert_malformed
182 (module quote "(func (v128.const f32x4 -0x1p128 -0x1p128 -0x1p128 -0x1p128) drop)")
183 "constant out of range"
184)
185(assert_malformed
186 (module quote "(func (v128.const f32x4 1e39 1e39 1e39 1e39) drop)")
187 "constant out of range"
188)
189(assert_malformed
190 (module quote "(func (v128.const f32x4 -1e39 -1e39 -1e39 -1e39) drop)")
191 "constant out of range"
192)
193(assert_malformed
194 (module quote "(func (v128.const f32x4 340282356779733661637539395458142568448 340282356779733661637539395458142568448"
195 " 340282356779733661637539395458142568448 340282356779733661637539395458142568448) drop)")
196 "constant out of range"
197)
198(assert_malformed
199 (module quote "(func (v128.const f32x4 -340282356779733661637539395458142568448 -340282356779733661637539395458142568448"
200 " -340282356779733661637539395458142568448 -340282356779733661637539395458142568448) drop)")
201 "constant out of range"
202)
203
204(assert_malformed
205 (module quote "(func (v128.const f32x4 nan:0x80_0000 nan:0x80_0000 nan:0x80_0000 nan:0x80_0000) drop)")
206 "constant out of range"
207)
208
209(assert_malformed
210 (module quote "(func (v128.const f64x2 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552"
211 " 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)")
212 "constant out of range"
213)
214(assert_malformed
215 (module quote "(func (v128.const f64x2 -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552"
216 " -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)")
217 "constant out of range"
218)
219
220(assert_malformed
221 (module quote "(func (v128.const f64x2 nan:0x10_0000_0000_0000 nan:0x10_0000_0000_0000) drop)")
222 "constant out of range"
223)
224
225;; More malformed v128.const forms
226(assert_malformed
227 (module quote "(func (v128.const) drop)")
228 "unexpected token"
229)
230
231(assert_malformed
232 (module quote "(func (v128.const 0 0 0 0) drop)")
233 "unexpected token"
234)
235(assert_malformed
236 (module quote "(func (v128.const i8x16) drop)")
237 "wrong number of lane literals"
238)
239(assert_malformed
240 (module quote "(func (v128.const i8x16 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x 0x) drop)")
241 "unknown operator"
242)
243(assert_malformed
244 (module quote "(func (v128.const i8x16 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x) drop)")
245 "unknown operator"
246)
247(assert_malformed
248 (module quote "(func (v128.const i8x16 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg) drop)")
249 "unknown operator"
250)
251
252(assert_malformed
253 (module quote "(func (v128.const i16x8) drop)")
254 "wrong number of lane literals"
255)
256(assert_malformed
257 (module quote "(func (v128.const i16x8 0x 0x 0x 0x 0x 0x 0x 0x) drop)")
258 "unknown operator"
259)
260(assert_malformed
261 (module quote "(func (v128.const i16x8 1x 1x 1x 1x 1x 1x 1x 1x) drop)")
262 "unknown operator"
263)
264(assert_malformed
265 (module quote "(func (v128.const i16x8 0xg 0xg 0xg 0xg 0xg 0xg 0xg 0xg) drop)")
266 "unknown operator"
267)
268
269(assert_malformed
270 (module quote "(func (v128.const i32x4) drop)")
271 "wrong number of lane literals"
272)
273(assert_malformed
274 (module quote "(func (v128.const i32x4 0x 0x 0x 0x) drop)")
275 "unknown operator"
276)
277(assert_malformed
278 (module quote "(func (v128.const i32x4 1x 1x 1x 1x) drop)")
279 "unknown operator"
280)
281(assert_malformed
282 (module quote "(func (v128.const i32x4 0xg 0xg 0xg 0xg) drop)")
283 "unknown operator"
284)
285
286(assert_malformed
287 (module quote "(func (v128.const i64x2) drop)")
288 "wrong number of lane literals"
289)
290(assert_malformed
291 (module quote "(func (v128.const i64x2 0x 0x) drop)")
292 "unknown operator"
293)
294(assert_malformed
295 (module quote "(func (v128.const f64x2 1x 1x) drop)")
296 "unknown operator"
297)
298(assert_malformed
299 (module quote "(func (v128.const f64x2 0xg 0xg) drop)")
300 "unknown operator"
301)
302
303(assert_malformed
304 (module quote "(func (v128.const f32x4) drop)")
305 "wrong number of lane literals"
306)
307(assert_malformed
308 (module quote "(func (v128.const f32x4 .0 .0 .0 .0) drop)")
309 "unknown operator"
310)
311(assert_malformed
312 (module quote "(func (v128.const f32x4 .0e0 .0e0 .0e0 .0e0) drop)")
313 "unknown operator"
314)
315(assert_malformed
316 (module quote "(func (v128.const f32x4 0e 0e 0e 0e) drop)")
317 "unknown operator"
318)
319(assert_malformed
320 (module quote "(func (v128.const f32x4 0e+ 0e+ 0e+ 0e+) drop)")
321 "unknown operator"
322)
323(assert_malformed
324 (module quote "(func (v128.const f32x4 0.0e 0.0e 0.0e 0.0e) drop)")
325 "unknown operator"
326)
327(assert_malformed
328 (module quote "(func (v128.const f32x4 0.0e- 0.0e- 0.0e- 0.0e-) drop)")
329 "unknown operator"
330)
331(assert_malformed
332 (module quote "(func (v128.const f32x4 0x 0x 0x 0x) drop)")
333 "unknown operator"
334)
335(assert_malformed
336 (module quote "(func (v128.const f32x4 1x 1x 1x 1x) drop)")
337 "unknown operator"
338)
339(assert_malformed
340 (module quote "(func (v128.const f32x4 0xg 0xg 0xg 0xg) drop)")
341 "unknown operator"
342)
343(assert_malformed
344 (module quote "(func (v128.const f32x4 0x. 0x. 0x. 0x.) drop)")
345 "unknown operator"
346)
347(assert_malformed
348 (module quote "(func (v128.const f32x4 0x0.g 0x0.g 0x0.g 0x0.g) drop)")
349 "unknown operator"
350)
351(assert_malformed
352 (module quote "(func (v128.const f32x4 0x0p 0x0p 0x0p 0x0p) drop)")
353 "unknown operator"
354)
355(assert_malformed
356 (module quote "(func (v128.const f32x4 0x0p+ 0x0p+ 0x0p+ 0x0p+) drop)")
357 "unknown operator"
358)
359(assert_malformed
360 (module quote "(func (v128.const f32x4 0x0p- 0x0p- 0x0p- 0x0p-) drop)")
361 "unknown operator"
362)
363(assert_malformed
364 (module quote "(func (v128.const f32x4 0x0.0p 0x0.0p 0x0.0p 0x0.0p) drop)")
365 "unknown operator"
366)
367(assert_malformed
368 (module quote "(func (v128.const f32x4 0x0.0p+ 0x0.0p+ 0x0.0p+ 0x0.0p+) drop)")
369 "unknown operator"
370)
371(assert_malformed
372 (module quote "(func (v128.const f32x4 0x0.0p- 0x0.0p- 0x0.0p- 0x0.0p-) drop)")
373 "unknown operator"
374)
375(assert_malformed
376 (module quote "(func (v128.const f32x4 0x0pA 0x0pA 0x0pA 0x0pA) drop)")
377 "unknown operator"
378)
379(assert_malformed
380 (module quote "(func (v128.const f32x4 nan:1 nan:1 nan:1 nan:1) drop)")
381 "unknown operator"
382)
383(assert_malformed
384 (module quote "(func (v128.const f32x4 nan:0x0 nan:0x0 nan:0x0 nan:0x0) drop)")
385 "constant out of range"
386)
387
388(assert_malformed
389 (module quote "(func (v128.const f64x2) drop)")
390 "wrong number of lane literals"
391)
392(assert_malformed
393 (module quote "(func (v128.const f64x2 .0 .0) drop)")
394 "unknown operator"
395)
396(assert_malformed
397 (module quote "(func (v128.const f64x2 .0e0 .0e0) drop)")
398 "unknown operator"
399)
400(assert_malformed
401 (module quote "(func (v128.const f64x2 0e 0e) drop)")
402 "unknown operator"
403)
404(assert_malformed
405 (module quote "(func (v128.const f64x2 0e+ 0e+) drop)")
406 "unknown operator"
407)
408(assert_malformed
409 (module quote "(func (v128.const f64x2 0.0e+ 0.0e+) drop)")
410 "unknown operator"
411)
412(assert_malformed
413 (module quote "(func (v128.const f64x2 0.0e- 0.0e-) drop)")
414 "unknown operator"
415)
416(assert_malformed
417 (module quote "(func (v128.const f64x2 0x 0x) drop)")
418 "unknown operator"
419)
420(assert_malformed
421 (module quote "(func (v128.const f64x2 1x 1x) drop)")
422 "unknown operator"
423)
424(assert_malformed
425 (module quote "(func (v128.const f64x2 0xg 0xg) drop)")
426 "unknown operator"
427)
428(assert_malformed
429 (module quote "(func (v128.const f64x2 0x. 0x.) drop)")
430 "unknown operator"
431)
432(assert_malformed
433 (module quote "(func (v128.const f64x2 0x0.g 0x0.g) drop)")
434 "unknown operator"
435)
436(assert_malformed
437 (module quote "(func (v128.const f64x2 0x0p 0x0p) drop)")
438 "unknown operator"
439)
440(assert_malformed
441 (module quote "(func (v128.const f64x2 0x0p+ 0x0p+) drop)")
442 "unknown operator"
443)
444(assert_malformed
445 (module quote "(func (v128.const f64x2 0x0p- 0x0p-) drop)")
446 "unknown operator"
447)
448(assert_malformed
449 (module quote "(func (v128.const f64x2 0x0.0p 0x0.0p) drop)")
450 "unknown operator"
451)
452(assert_malformed
453 (module quote "(func (v128.const f64x2 0x0.0p+ 0x0.0p+) drop)")
454 "unknown operator"
455)
456(assert_malformed
457 (module quote "(func (v128.const f64x2 0x0.0p- 0x0.0p-) drop)")
458 "unknown operator"
459)
460(assert_malformed
461 (module quote "(func (v128.const f64x2 0x0pA 0x0pA) drop)")
462 "unknown operator"
463)
464(assert_malformed
465 (module quote "(func (v128.const f64x2 nan:1 nan:1) drop)")
466 "unknown operator"
467)
468(assert_malformed
469 (module quote "(func (v128.const f64x2 nan:0x0 nan:0x0) drop)")
470 "constant out of range"
471)
472
473;; too little arguments
474
475(assert_malformed
476 (module quote "(func (v128.const i32x4 0x10000000000000000 0x10000000000000000) drop)")
477 "wrong number of lane literals"
478)
479
480;; too many arguments
481(assert_malformed
482 (module quote "(func (v128.const i32x4 0x1 0x1 0x1 0x1 0x1) drop)")
483 "wrong number of lane literals"
484)
485
486;; Rounding behaviour
487
488;; f32x4, small exponent
489(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000100000000000p-50 +0x1.00000100000000000p-50 +0x1.00000100000000000p-50 +0x1.00000100000000000p-50)))
490(assert_return (invoke "f") (v128.const f32x4 +0x1.000000p-50 +0x1.000000p-50 +0x1.000000p-50 +0x1.000000p-50))
491(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000100000000000p-50 -0x1.00000100000000000p-50 -0x1.00000100000000000p-50 -0x1.00000100000000000p-50)))
492(assert_return (invoke "f") (v128.const f32x4 -0x1.000000p-50 -0x1.000000p-50 -0x1.000000p-50 -0x1.000000p-50))
493(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000500000000001p-50 +0x1.00000500000000001p-50 +0x1.00000500000000001p-50 +0x1.00000500000000001p-50)))
494(assert_return (invoke "f") (v128.const f32x4 +0x1.000006p-50 +0x1.000006p-50 +0x1.000006p-50 +0x1.000006p-50))
495(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000500000000001p-50 -0x1.00000500000000001p-50 -0x1.00000500000000001p-50 -0x1.00000500000000001p-50)))
496(assert_return (invoke "f") (v128.const f32x4 -0x1.000006p-50 -0x1.000006p-50 -0x1.000006p-50 -0x1.000006p-50))
497
498(module (func (export "f") (result v128) (v128.const f32x4 +0x4000.004000000p-64 +0x4000.004000000p-64 +0x4000.004000000p-64 +0x4000.004000000p-64)))
499(assert_return (invoke "f") (v128.const f32x4 +0x1.000000p-50 +0x1.000000p-50 +0x1.000000p-50 +0x1.000000p-50))
500(module (func (export "f") (result v128) (v128.const f32x4 -0x4000.004000000p-64 -0x4000.004000000p-64 -0x4000.004000000p-64 -0x4000.004000000p-64)))
501(assert_return (invoke "f") (v128.const f32x4 -0x1.000000p-50 -0x1.000000p-50 -0x1.000000p-50 -0x1.000000p-50))
502(module (func (export "f") (result v128) (v128.const f32x4 +0x4000.014000001p-64 +0x4000.014000001p-64 +0x4000.014000001p-64 +0x4000.014000001p-64)))
503(assert_return (invoke "f") (v128.const f32x4 +0x1.000006p-50 +0x1.000006p-50 +0x1.000006p-50 +0x1.000006p-50))
504(module (func (export "f") (result v128) (v128.const f32x4 -0x4000.014000001p-64 -0x4000.014000001p-64 -0x4000.014000001p-64 -0x4000.014000001p-64)))
505(assert_return (invoke "f") (v128.const f32x4 -0x1.000006p-50 -0x1.000006p-50 -0x1.000006p-50 -0x1.000006p-50))
506
507(module (func (export "f") (result v128) (v128.const f32x4 +8.8817847263968443573e-16 +8.8817847263968443573e-16 +8.8817847263968443573e-16 +8.8817847263968443573e-16)))
508(assert_return (invoke "f") (v128.const f32x4 +0x1.000000p-50 +0x1.000000p-50 +0x1.000000p-50 +0x1.000000p-50))
509(module (func (export "f") (result v128) (v128.const f32x4 -8.8817847263968443573e-16 -8.8817847263968443573e-16 -8.8817847263968443573e-16 -8.8817847263968443573e-16)))
510(assert_return (invoke "f") (v128.const f32x4 -0x1.000000p-50 -0x1.000000p-50 -0x1.000000p-50 -0x1.000000p-50))
511(module (func (export "f") (result v128) (v128.const f32x4 +8.8817857851880284253e-16 +8.8817857851880284253e-16 +8.8817857851880284253e-16 +8.8817857851880284253e-16)))
512(assert_return (invoke "f") (v128.const f32x4 +0x1.000004p-50 +0x1.000004p-50 +0x1.000004p-50 +0x1.000004p-50))
513(module (func (export "f") (result v128) (v128.const f32x4 -8.8817857851880284253e-16 -8.8817857851880284253e-16 -8.8817857851880284253e-16 -8.8817857851880284253e-16)))
514(assert_return (invoke "f") (v128.const f32x4 -0x1.000004p-50 -0x1.000004p-50 -0x1.000004p-50 -0x1.000004p-50))
515
516;; f32x4, large exponent
517(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000100000000000p+50 +0x1.00000100000000000p+50 +0x1.00000100000000000p+50 +0x1.00000100000000000p+50)))
518(assert_return (invoke "f") (v128.const f32x4 +0x1.000000p+50 +0x1.000000p+50 +0x1.000000p+50 +0x1.000000p+50))
519(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000100000000000p+50 -0x1.00000100000000000p+50 -0x1.00000100000000000p+50 -0x1.00000100000000000p+50)))
520(assert_return (invoke "f") (v128.const f32x4 -0x1.000000p+50 -0x1.000000p+50 -0x1.000000p+50 -0x1.000000p+50))
521(module (func (export "f") (result v128) (v128.const f32x4 +0x1.00000500000000001p+50 +0x1.00000500000000001p+50 +0x1.00000500000000001p+50 +0x1.00000500000000001p+50)))
522(assert_return (invoke "f") (v128.const f32x4 +0x1.000006p+50 +0x1.000006p+50 +0x1.000006p+50 +0x1.000006p+50))
523(module (func (export "f") (result v128) (v128.const f32x4 -0x1.00000500000000001p+50 -0x1.00000500000000001p+50 -0x1.00000500000000001p+50 -0x1.00000500000000001p+50)))
524(assert_return (invoke "f") (v128.const f32x4 -0x1.000006p+50 -0x1.000006p+50 -0x1.000006p+50 -0x1.000006p+50))
525
526(module (func (export "f") (result v128) (v128.const f32x4 +0x4000004000000 +0x4000004000000 +0x4000004000000 +0x4000004000000)))
527(assert_return (invoke "f") (v128.const f32x4 +0x1.000000p+50 +0x1.000000p+50 +0x1.000000p+50 +0x1.000000p+50))
528(module (func (export "f") (result v128) (v128.const f32x4 -0x4000004000000 -0x4000004000000 -0x4000004000000 -0x4000004000000)))
529(assert_return (invoke "f") (v128.const f32x4 -0x1.000000p+50 -0x1.000000p+50 -0x1.000000p+50 -0x1.000000p+50))
530(module (func (export "f") (result v128) (v128.const f32x4 +0x400000c000000 +0x400000c000000 +0x400000c000000 +0x400000c000000)))
531(assert_return (invoke "f") (v128.const f32x4 +0x1.000004p+50 +0x1.000004p+50 +0x1.000004p+50 +0x1.000004p+50))
532(module (func (export "f") (result v128) (v128.const f32x4 -0x400000c000000 -0x400000c000000 -0x400000c000000 -0x400000c000000)))
533(assert_return (invoke "f") (v128.const f32x4 -0x1.000004p+50 -0x1.000004p+50 -0x1.000004p+50 -0x1.000004p+50))
534
535(module (func (export "f") (result v128) (v128.const f32x4 +1125899973951488 +1125899973951488 +1125899973951488 +1125899973951488)))
536(assert_return (invoke "f") (v128.const f32x4 +0x1.000000p+50 +0x1.000000p+50 +0x1.000000p+50 +0x1.000000p+50))
537(module (func (export "f") (result v128) (v128.const f32x4 -1125899973951488 -1125899973951488 -1125899973951488 -1125899973951488)))
538(assert_return (invoke "f") (v128.const f32x4 -0x1.000000p+50 -0x1.000000p+50 -0x1.000000p+50 -0x1.000000p+50))
539(module (func (export "f") (result v128) (v128.const f32x4 +1125900108169216 +1125900108169216 +1125900108169216 +1125900108169216)))
540(assert_return (invoke "f") (v128.const f32x4 +0x1.000004p+50 +0x1.000004p+50 +0x1.000004p+50 +0x1.000004p+50))
541(module (func (export "f") (result v128) (v128.const f32x4 -1125900108169216 -1125900108169216 -1125900108169216 -1125900108169216)))
542(assert_return (invoke "f") (v128.const f32x4 -0x1.000004p+50 -0x1.000004p+50 -0x1.000004p+50 -0x1.000004p+50))
543
544;; f32x4, subnormal
545(module (func (export "f") (result v128) (v128.const f32x4 +0x0.00000100000000000p-126 +0x0.00000100000000000p-126 +0x0.00000100000000000p-126 +0x0.00000100000000000p-126)))
546(assert_return (invoke "f") (v128.const f32x4 +0x0.000000p-126 +0x0.000000p-126 +0x0.000000p-126 +0x0.000000p-126))
547(module (func (export "f") (result v128) (v128.const f32x4 -0x0.00000100000000000p-126 -0x0.00000100000000000p-126 -0x0.00000100000000000p-126 -0x0.00000100000000000p-126)))
548(assert_return (invoke "f") (v128.const f32x4 -0x0.000000p-126 -0x0.000000p-126 -0x0.000000p-126 -0x0.000000p-126))
549(module (func (export "f") (result v128) (v128.const f32x4 +0x0.00000500000000001p-126 +0x0.00000500000000001p-126 +0x0.00000500000000001p-126 +0x0.00000500000000001p-126)))
550(assert_return (invoke "f") (v128.const f32x4 +0x0.000006p-126 +0x0.000006p-126 +0x0.000006p-126 +0x0.000006p-126))
551(module (func (export "f") (result v128) (v128.const f32x4 -0x0.00000500000000001p-126 -0x0.00000500000000001p-126 -0x0.00000500000000001p-126 -0x0.00000500000000001p-126)))
552(assert_return (invoke "f") (v128.const f32x4 -0x0.000006p-126 -0x0.000006p-126 -0x0.000006p-126 -0x0.000006p-126))
553
554;; f32x4, round down at limit to infinity
555(module (func (export "f") (result v128) (v128.const f32x4 +0x1.fffffe8p127 +0x1.fffffe8p127 +0x1.fffffe8p127 +0x1.fffffe8p127)))
556(assert_return (invoke "f") (v128.const f32x4 +0x1.fffffep127 +0x1.fffffep127 +0x1.fffffep127 +0x1.fffffep127))
557(module (func (export "f") (result v128) (v128.const f32x4 -0x1.fffffe8p127 -0x1.fffffe8p127 -0x1.fffffe8p127 -0x1.fffffe8p127)))
558(assert_return (invoke "f") (v128.const f32x4 -0x1.fffffep127 -0x1.fffffep127 -0x1.fffffep127 -0x1.fffffep127))
559(module (func (export "f") (result v128) (v128.const f32x4 +0x1.fffffefffffffffffp127 +0x1.fffffefffffffffffp127 +0x1.fffffefffffffffffp127 +0x1.fffffefffffffffffp127)))
560(assert_return (invoke "f") (v128.const f32x4 +0x1.fffffep127 +0x1.fffffep127 +0x1.fffffep127 +0x1.fffffep127))
561(module (func (export "f") (result v128) (v128.const f32x4 -0x1.fffffefffffffffffp127 -0x1.fffffefffffffffffp127 -0x1.fffffefffffffffffp127 -0x1.fffffefffffffffffp127)))
562(assert_return (invoke "f") (v128.const f32x4 -0x1.fffffep127 -0x1.fffffep127 -0x1.fffffep127 -0x1.fffffep127))
563
564;; f64x2, small exponent
565(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p-600)))
566(assert_return (invoke "f") (f64.const +0x1.0000000000000p-600))
567(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p-600)))
568(assert_return (invoke "f") (f64.const -0x1.0000000000000p-600))
569(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p-600)))
570(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
571(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p-600)))
572(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
573(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp-600)))
574(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
575(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp-600)))
576(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
577(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p-600)))
578(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
579(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p-600)))
580(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
581(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p-600)))
582(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
583(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p-600)))
584(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
585(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp-600)))
586(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
587(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp-600)))
588(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
589(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p-600)))
590(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
591(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p-600)))
592(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
593(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p-600)))
594(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
595(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p-600)))
596(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
597(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp-600)))
598(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
599(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp-600)))
600(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
601(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p-600)))
602(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
603(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p-600)))
604(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
605(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p-600)))
606(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
607(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p-600)))
608(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
609(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp-600)))
610(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
611(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp-600)))
612(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
613(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-600)))
614(assert_return (invoke "f") (f64.const +0x1.0000000000003p-600))
615(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-600)))
616(assert_return (invoke "f") (f64.const -0x1.0000000000003p-600))
617(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000000p-627)))
618(assert_return (invoke "f") (f64.const +0x1.0000000000000p-600))
619(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000000p-627)))
620(assert_return (invoke "f") (f64.const -0x1.0000000000000p-600))
621(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000001p-627)))
622(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
623(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000001p-627)))
624(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
625(module (func (export "f") (result f64) (f64.const +0x8000000.0000007fffffffffffp-627)))
626(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
627(module (func (export "f") (result f64) (f64.const -0x8000000.0000007fffffffffffp-627)))
628(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
629(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000000p-627)))
630(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
631(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000000p-627)))
632(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
633(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000001p-627)))
634(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
635(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000001p-627)))
636(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
637(module (func (export "f") (result f64) (f64.const +0x8000000.000000bfffffffffffp-627)))
638(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600))
639(module (func (export "f") (result f64) (f64.const -0x8000000.000000bfffffffffffp-627)))
640(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600))
641(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000000p-627)))
642(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
643(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000000p-627)))
644(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
645(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000001p-627)))
646(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
647(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000001p-627)))
648(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
649(module (func (export "f") (result f64) (f64.const +0x8000000.000000ffffffffffffp-627)))
650(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
651(module (func (export "f") (result f64) (f64.const -0x8000000.000000ffffffffffffp-627)))
652(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
653(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000000p-627)))
654(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
655(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000000p-627)))
656(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
657(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000001p-627)))
658(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
659(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000001p-627)))
660(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
661(module (func (export "f") (result f64) (f64.const +0x8000000.0000013fffffffffffp-627)))
662(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600))
663(module (func (export "f") (result f64) (f64.const -0x8000000.0000013fffffffffffp-627)))
664(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600))
665(module (func (export "f") (result f64) (f64.const +0x8000000.000001400000000001p-627)))
666(assert_return (invoke "f") (f64.const +0x1.0000000000003p-600))
667(module (func (export "f") (result f64) (f64.const -0x8000000.000001400000000001p-627)))
668(assert_return (invoke "f") (f64.const -0x1.0000000000003p-600))
669(module (func (export "f") (result f64) (f64.const +5.3575430359313371995e+300)))
670(assert_return (invoke "f") (f64.const +0x1.0000000000000p+999))
671(module (func (export "f") (result f64) (f64.const -5.3575430359313371995e+300)))
672(assert_return (invoke "f") (f64.const -0x1.0000000000000p+999))
673(module (func (export "f") (result f64) (f64.const +5.3575430359313371996e+300)))
674(assert_return (invoke "f") (f64.const +0x1.0000000000001p+999))
675(module (func (export "f") (result f64) (f64.const -5.3575430359313371996e+300)))
676(assert_return (invoke "f") (f64.const -0x1.0000000000001p+999))
677(module (func (export "f") (result f64) (f64.const +5.3575430359313383891e+300)))
678(assert_return (invoke "f") (f64.const +0x1.0000000000001p+999))
679(module (func (export "f") (result f64) (f64.const -5.3575430359313383891e+300)))
680(assert_return (invoke "f") (f64.const -0x1.0000000000001p+999))
681(module (func (export "f") (result f64) (f64.const +5.3575430359313383892e+300)))
682(assert_return (invoke "f") (f64.const +0x1.0000000000002p+999))
683(module (func (export "f") (result f64) (f64.const -5.3575430359313383892e+300)))
684(assert_return (invoke "f") (f64.const -0x1.0000000000002p+999))
685
686;; f64, large exponent
687(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000080000000000p+600 +0x1.000000000000080000000000p+600)))
688(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000000p+600 +0x1.0000000000000p+600))
689(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000080000000000p+600 -0x1.000000000000080000000000p+600)))
690(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000000p+600 -0x1.0000000000000p+600))
691(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000080000000001p+600 +0x1.000000000000080000000001p+600)))
692(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+600 +0x1.0000000000001p+600))
693(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000080000000001p+600 -0x1.000000000000080000000001p+600)))
694(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+600 -0x1.0000000000001p+600))
695(module (func (export "f") (result v128) (v128.const f64x2 +0x1.0000000000000fffffffffffp+600 +0x1.0000000000000fffffffffffp+600)))
696(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+600 +0x1.0000000000001p+600))
697(module (func (export "f") (result v128) (v128.const f64x2 -0x1.0000000000000fffffffffffp+600 -0x1.0000000000000fffffffffffp+600)))
698(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+600 -0x1.0000000000001p+600))
699(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000100000000000p+600 +0x1.000000000000100000000000p+600)))
700(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+600 +0x1.0000000000001p+600))
701(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000100000000000p+600 -0x1.000000000000100000000000p+600)))
702(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+600 -0x1.0000000000001p+600))
703(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000100000000001p+600 +0x1.000000000000100000000001p+600)))
704(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+600 +0x1.0000000000001p+600))
705(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000100000000001p+600 -0x1.000000000000100000000001p+600)))
706(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+600 -0x1.0000000000001p+600))
707(module (func (export "f") (result v128) (v128.const f64x2 +0x1.00000000000017ffffffffffp+600 +0x1.00000000000017ffffffffffp+600)))
708(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+600 +0x1.0000000000001p+600))
709(module (func (export "f") (result v128) (v128.const f64x2 -0x1.00000000000017ffffffffffp+600 -0x1.00000000000017ffffffffffp+600)))
710(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+600 -0x1.0000000000001p+600))
711(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000180000000000p+600 +0x1.000000000000180000000000p+600)))
712(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
713(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000180000000000p+600 -0x1.000000000000180000000000p+600)))
714(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
715(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000180000000001p+600 +0x1.000000000000180000000001p+600)))
716(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
717(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000180000000001p+600 -0x1.000000000000180000000001p+600)))
718(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
719(module (func (export "f") (result v128) (v128.const f64x2 +0x1.0000000000001fffffffffffp+600 +0x1.0000000000001fffffffffffp+600)))
720(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
721(module (func (export "f") (result v128) (v128.const f64x2 -0x1.0000000000001fffffffffffp+600 -0x1.0000000000001fffffffffffp+600)))
722(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
723(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000200000000000p+600 +0x1.000000000000200000000000p+600)))
724(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
725(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000200000000000p+600 -0x1.000000000000200000000000p+600)))
726(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
727(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000200000000001p+600 +0x1.000000000000200000000001p+600)))
728(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
729(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000200000000001p+600 -0x1.000000000000200000000001p+600)))
730(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
731(module (func (export "f") (result v128) (v128.const f64x2 +0x1.00000000000027ffffffffffp+600 +0x1.00000000000027ffffffffffp+600)))
732(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
733(module (func (export "f") (result v128) (v128.const f64x2 -0x1.00000000000027ffffffffffp+600 -0x1.00000000000027ffffffffffp+600)))
734(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
735(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000280000000000p+600 +0x1.000000000000280000000000p+600)))
736(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+600 +0x1.0000000000002p+600))
737(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000280000000000p+600 -0x1.000000000000280000000000p+600)))
738(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+600 -0x1.0000000000002p+600))
739(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000280000000001p+600 +0x1.000000000000280000000001p+600)))
740(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000003p+600 +0x1.0000000000003p+600))
741(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000280000000001p+600 -0x1.000000000000280000000001p+600)))
742(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000003p+600 -0x1.0000000000003p+600))
743(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000100000000000 +0x2000000000000100000000000)))
744(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000000p+97 +0x1.0000000000000p+97))
745(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000100000000000 -0x2000000000000100000000000)))
746(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000000p+97 -0x1.0000000000000p+97))
747(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000100000000001 +0x2000000000000100000000001)))
748(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+97 +0x1.0000000000001p+97))
749(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000100000000001 -0x2000000000000100000000001)))
750(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+97 -0x1.0000000000001p+97))
751(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000001fffffffffff +0x20000000000001fffffffffff)))
752(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+97 +0x1.0000000000001p+97))
753(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000001fffffffffff -0x20000000000001fffffffffff)))
754(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+97 -0x1.0000000000001p+97))
755(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000200000000000 +0x2000000000000200000000000)))
756(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+97 +0x1.0000000000001p+97))
757(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000200000000000 -0x2000000000000200000000000)))
758(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+97 -0x1.0000000000001p+97))
759(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000200000000001 +0x2000000000000200000000001)))
760(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+97 +0x1.0000000000001p+97))
761(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000200000000001 -0x2000000000000200000000001)))
762(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+97 -0x1.0000000000001p+97))
763(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000002fffffffffff +0x20000000000002fffffffffff)))
764(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+97 +0x1.0000000000001p+97))
765(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000002fffffffffff -0x20000000000002fffffffffff)))
766(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+97 -0x1.0000000000001p+97))
767(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000300000000000 +0x2000000000000300000000000)))
768(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
769(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000300000000000 -0x2000000000000300000000000)))
770(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
771(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000300000000001 +0x2000000000000300000000001)))
772(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
773(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000300000000001 -0x2000000000000300000000001)))
774(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
775(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000003fffffffffff +0x20000000000003fffffffffff)))
776(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
777(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000003fffffffffff -0x20000000000003fffffffffff)))
778(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
779(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000400000000000 +0x2000000000000400000000000)))
780(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
781(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000400000000000 -0x2000000000000400000000000)))
782(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
783(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000400000000001 +0x2000000000000400000000001)))
784(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
785(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000400000000001 -0x2000000000000400000000001)))
786(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
787(module (func (export "f") (result v128) (v128.const f64x2 +0x20000000000004fffffffffff +0x20000000000004fffffffffff)))
788(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
789(module (func (export "f") (result v128) (v128.const f64x2 -0x20000000000004fffffffffff -0x20000000000004fffffffffff)))
790(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
791(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000500000000000 +0x2000000000000500000000000)))
792(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+97 +0x1.0000000000002p+97))
793(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000500000000000 -0x2000000000000500000000000)))
794(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+97 -0x1.0000000000002p+97))
795(module (func (export "f") (result v128) (v128.const f64x2 +0x2000000000000500000000001 +0x2000000000000500000000001)))
796(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000003p+97 +0x1.0000000000003p+97))
797(module (func (export "f") (result v128) (v128.const f64x2 -0x2000000000000500000000001 -0x2000000000000500000000001)))
798(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000003p+97 -0x1.0000000000003p+97))
799(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847104 +1152921504606847104)))
800(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000000p+60 +0x1.0000000000000p+60))
801(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847104 -1152921504606847104)))
802(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000000p+60 -0x1.0000000000000p+60))
803(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847105 +1152921504606847105)))
804(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+60 +0x1.0000000000001p+60))
805(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847105 -1152921504606847105)))
806(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+60 -0x1.0000000000001p+60))
807(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847359 +1152921504606847359)))
808(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000001p+60 +0x1.0000000000001p+60))
809(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847359 -1152921504606847359)))
810(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000001p+60 -0x1.0000000000001p+60))
811(module (func (export "f") (result v128) (v128.const f64x2 +1152921504606847360 +1152921504606847360)))
812(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000002p+60 +0x1.0000000000002p+60))
813(module (func (export "f") (result v128) (v128.const f64x2 -1152921504606847360 -1152921504606847360)))
814(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000002p+60 -0x1.0000000000002p+60))
815
816;; f64x2, subnormal
817(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000080000000000p-1022 +0x0.000000000000080000000000p-1022)))
818(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000000p-1022 +0x0.0000000000000p-1022))
819(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000080000000000p-1022 -0x0.000000000000080000000000p-1022)))
820(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000000p-1022 -0x0.0000000000000p-1022))
821(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000080000000001p-1022 +0x0.000000000000080000000001p-1022)))
822(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000001p-1022 +0x0.0000000000001p-1022))
823(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000080000000001p-1022 -0x0.000000000000080000000001p-1022)))
824(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000001p-1022 -0x0.0000000000001p-1022))
825(module (func (export "f") (result v128) (v128.const f64x2 +0x0.0000000000000fffffffffffp-1022 +0x0.0000000000000fffffffffffp-1022)))
826(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000001p-1022 +0x0.0000000000001p-1022))
827(module (func (export "f") (result v128) (v128.const f64x2 -0x0.0000000000000fffffffffffp-1022 -0x0.0000000000000fffffffffffp-1022)))
828(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000001p-1022 -0x0.0000000000001p-1022))
829(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000100000000000p-1022 +0x0.000000000000100000000000p-1022)))
830(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000001p-1022 +0x0.0000000000001p-1022))
831(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000100000000000p-1022 -0x0.000000000000100000000000p-1022)))
832(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000001p-1022 -0x0.0000000000001p-1022))
833(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000100000000001p-1022 +0x0.000000000000100000000001p-1022)))
834(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000001p-1022 +0x0.0000000000001p-1022))
835(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000100000000001p-1022 -0x0.000000000000100000000001p-1022)))
836(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000001p-1022 -0x0.0000000000001p-1022))
837(module (func (export "f") (result v128) (v128.const f64x2 +0x0.00000000000017ffffffffffp-1022 +0x0.00000000000017ffffffffffp-1022)))
838(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000001p-1022 +0x0.0000000000001p-1022))
839(module (func (export "f") (result v128) (v128.const f64x2 -0x0.00000000000017ffffffffffp-1022 -0x0.00000000000017ffffffffffp-1022)))
840(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000001p-1022 -0x0.0000000000001p-1022))
841(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000180000000000p-1022 +0x0.000000000000180000000000p-1022)))
842(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
843(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000180000000000p-1022 -0x0.000000000000180000000000p-1022)))
844(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
845(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000180000000001p-1022 +0x0.000000000000180000000001p-1022)))
846(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
847(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000180000000001p-1022 -0x0.000000000000180000000001p-1022)))
848(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
849(module (func (export "f") (result v128) (v128.const f64x2 +0x0.0000000000001fffffffffffp-1022 +0x0.0000000000001fffffffffffp-1022)))
850(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
851(module (func (export "f") (result v128) (v128.const f64x2 -0x0.0000000000001fffffffffffp-1022 -0x0.0000000000001fffffffffffp-1022)))
852(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
853(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000200000000000p-1022 +0x0.000000000000200000000000p-1022)))
854(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
855(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000200000000000p-1022 -0x0.000000000000200000000000p-1022)))
856(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
857(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000200000000001p-1022 +0x0.000000000000200000000001p-1022)))
858(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
859(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000200000000001p-1022 -0x0.000000000000200000000001p-1022)))
860(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
861(module (func (export "f") (result v128) (v128.const f64x2 +0x0.00000000000027ffffffffffp-1022 +0x0.00000000000027ffffffffffp-1022)))
862(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
863(module (func (export "f") (result v128) (v128.const f64x2 -0x0.00000000000027ffffffffffp-1022 -0x0.00000000000027ffffffffffp-1022)))
864(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
865(module (func (export "f") (result v128) (v128.const f64x2 +0x0.000000000000280000000000p-1022 +0x0.000000000000280000000000p-1022)))
866(assert_return (invoke "f") (v128.const f64x2 +0x0.0000000000002p-1022 +0x0.0000000000002p-1022))
867(module (func (export "f") (result v128) (v128.const f64x2 -0x0.000000000000280000000000p-1022 -0x0.000000000000280000000000p-1022)))
868(assert_return (invoke "f") (v128.const f64x2 -0x0.0000000000002p-1022 -0x0.0000000000002p-1022))
869(module (func (export "f") (result v128) (v128.const f64x2 +0x1.000000000000280000000001p-1022 +0x1.000000000000280000000001p-1022)))
870(assert_return (invoke "f") (v128.const f64x2 +0x1.0000000000003p-1022 +0x1.0000000000003p-1022))
871(module (func (export "f") (result v128) (v128.const f64x2 -0x1.000000000000280000000001p-1022 -0x1.000000000000280000000001p-1022)))
872(assert_return (invoke "f") (v128.const f64x2 -0x1.0000000000003p-1022 -0x1.0000000000003p-1022))
873
874;; f64x2, round down at limit to infinity
875(module (func (export "f") (result v128) (v128.const f64x2 +0x1.fffffffffffff4p1023 +0x1.fffffffffffff4p1023)))
876(assert_return (invoke "f") (v128.const f64x2 +0x1.fffffffffffffp1023 +0x1.fffffffffffffp1023))
877(module (func (export "f") (result v128) (v128.const f64x2 -0x1.fffffffffffff4p1023 -0x1.fffffffffffff4p1023)))
878(assert_return (invoke "f") (v128.const f64x2 -0x1.fffffffffffffp1023 -0x1.fffffffffffffp1023))
879(module (func (export "f") (result v128) (v128.const f64x2 +0x1.fffffffffffff7ffffffp1023 +0x1.fffffffffffff7ffffffp1023)))
880(assert_return (invoke "f") (v128.const f64x2 +0x1.fffffffffffffp1023 +0x1.fffffffffffffp1023))
881(module (func (export "f") (result v128) (v128.const f64x2 -0x1.fffffffffffff7ffffffp1023 -0x1.fffffffffffff7ffffffp1023)))
882(assert_return (invoke "f") (v128.const f64x2 -0x1.fffffffffffffp1023 -0x1.fffffffffffffp1023))
883
884;; As parameters of control constructs
885
886(module (memory 1)
887 (func (export "as-br-retval") (result v128)
888 (block (result v128) (br 0 (v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c)))
889 )
890 (func (export "as-br_if-retval") (result v128)
891 (block (result v128)
892 (br_if 0 (v128.const i32x4 0 1 2 3) (i32.const 1))
893 )
894 )
895 (func (export "as-return-retval") (result v128)
896 (return (v128.const i32x4 0 1 2 3))
897 )
898 (func (export "as-if-then-retval") (result v128)
899 (if (result v128) (i32.const 1)
900 (then (v128.const i32x4 0 1 2 3)) (else (v128.const i32x4 3 2 1 0))
901 )
902 )
903 (func (export "as-if-else-retval") (result v128)
904 (if (result v128) (i32.const 0)
905 (then (v128.const i32x4 0 1 2 3)) (else (v128.const i32x4 3 2 1 0))
906 )
907 )
908 (func $f (param v128 v128 v128) (result v128) (v128.const i32x4 0 1 2 3))
909 (func (export "as-call-param") (result v128)
910 (call $f (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3))
911 )
912 (func (export "as-block-retval") (result v128)
913 (block (result v128) (v128.const i32x4 0 1 2 3))
914 )
915 (func (export "as-loop-retval") (result v128)
916 (loop (result v128) (v128.const i32x4 0 1 2 3))
917 )
918 (func (export "as-drop-operand")
919 (drop (v128.const i32x4 0 1 2 3))
920 )
921
922 (func (export "as-br-retval2") (result v128)
923 (block (result v128) (br 0 (v128.const i64x2 0x0302010007060504 0x0b0a09080f0e0d0c)))
924 )
925 (func (export "as-br_if-retval2") (result v128)
926 (block (result v128)
927 (br_if 0 (v128.const i64x2 0 1) (i32.const 1))
928 )
929 )
930 (func (export "as-return-retval2") (result v128)
931 (return (v128.const i64x2 0 1))
932 )
933 (func (export "as-if-then-retval2") (result v128)
934 (if (result v128) (i32.const 1)
935 (then (v128.const i64x2 0 1)) (else (v128.const i64x2 1 0))
936 )
937 )
938 (func (export "as-if-else-retval2") (result v128)
939 (if (result v128) (i32.const 0)
940 (then (v128.const i64x2 0 1)) (else (v128.const i64x2 1 0))
941 )
942 )
943 (func $f2 (param v128 v128 v128) (result v128) (v128.const i64x2 0 1))
944 (func (export "as-call-param2") (result v128)
945 (call $f2 (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1))
946 )
947
948 (type $sig (func (param v128 v128 v128) (result v128)))
949 (table funcref (elem $f $f2))
950 (func (export "as-call_indirect-param") (result v128)
951 (call_indirect (type $sig)
952 (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (v128.const i32x4 0 1 2 3) (i32.const 0)
953 )
954 )
955 (func (export "as-call_indirect-param2") (result v128)
956 (call_indirect (type $sig)
957 (v128.const i64x2 0 1) (v128.const i64x2 0 1) (v128.const i64x2 0 1) (i32.const 1)
958 )
959 )
960 (func (export "as-block-retval2") (result v128)
961 (block (result v128) (v128.const i64x2 0 1))
962 )
963 (func (export "as-loop-retval2") (result v128)
964 (loop (result v128) (v128.const i64x2 0 1))
965 )
966 (func (export "as-drop-operand2")
967 (drop (v128.const i64x2 0 1))
968 )
969)
970
971(assert_return (invoke "as-br-retval") (v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c))
972(assert_return (invoke "as-br_if-retval") (v128.const i32x4 0 1 2 3))
973(assert_return (invoke "as-return-retval") (v128.const i32x4 0 1 2 3))
974(assert_return (invoke "as-if-then-retval") (v128.const i32x4 0 1 2 3))
975(assert_return (invoke "as-if-else-retval") (v128.const i32x4 3 2 1 0))
976(assert_return (invoke "as-call-param") (v128.const i32x4 0 1 2 3))
977(assert_return (invoke "as-call_indirect-param") (v128.const i32x4 0 1 2 3))
978(assert_return (invoke "as-block-retval") (v128.const i32x4 0 1 2 3))
979(assert_return (invoke "as-loop-retval") (v128.const i32x4 0 1 2 3))
980(assert_return (invoke "as-drop-operand"))
981
982(assert_return (invoke "as-br-retval2") (v128.const i64x2 0x0302010007060504 0x0b0a09080f0e0d0c))
983(assert_return (invoke "as-br_if-retval2") (v128.const i64x2 0 1))
984(assert_return (invoke "as-return-retval2") (v128.const i64x2 0 1))
985(assert_return (invoke "as-if-then-retval2") (v128.const i64x2 0 1))
986(assert_return (invoke "as-if-else-retval2") (v128.const i64x2 1 0))
987(assert_return (invoke "as-call-param2") (v128.const i64x2 0 1))
988(assert_return (invoke "as-call_indirect-param2") (v128.const i64x2 0 1))
989(assert_return (invoke "as-block-retval2") (v128.const i64x2 0 1))
990(assert_return (invoke "as-loop-retval2") (v128.const i64x2 0 1))
991(assert_return (invoke "as-drop-operand2"))
992
993;; v128 locals
994
995(module (memory 1)
996 (func (export "as-local.set/get-value_0_0") (param $0 v128) (result v128)
997 (local v128 v128 v128 v128)
998 (local.set 0 (local.get $0))
999 (local.get 0)
1000 )
1001 (func (export "as-local.set/get-value_0_1") (param $0 v128) (result v128)
1002 (local v128 v128 v128 v128)
1003 (local.set 0 (local.get $0))
1004 (local.set 1 (local.get 0))
1005 (local.set 2 (local.get 1))
1006 (local.set 3 (local.get 2))
1007 (local.get 0)
1008 )
1009 (func (export "as-local.set/get-value_3_0") (param $0 v128) (result v128)
1010 (local v128 v128 v128 v128)
1011 (local.set 0 (local.get $0))
1012 (local.set 1 (local.get 0))
1013 (local.set 2 (local.get 1))
1014 (local.set 3 (local.get 2))
1015 (local.get 3)
1016 )
1017 (func (export "as-local.tee-value") (result v128)
1018 (local v128)
1019 (local.tee 0 (v128.const i32x4 0 1 2 3))
1020 )
1021)
1022
1023(assert_return (invoke "as-local.set/get-value_0_0" (v128.const i32x4 0 0 0 0)) (v128.const i32x4 0 0 0 0))
1024(assert_return (invoke "as-local.set/get-value_0_1" (v128.const i32x4 1 1 1 1)) (v128.const i32x4 1 1 1 1))
1025(assert_return (invoke "as-local.set/get-value_3_0" (v128.const i32x4 2 2 2 2)) (v128.const i32x4 2 2 2 2))
1026(assert_return (invoke "as-local.tee-value") (v128.const i32x4 0 1 2 3))
1027
1028
1029;; v128 globals
1030
1031(module (memory 1)
1032 (global $g0 (mut v128) (v128.const i32x4 0 1 2 3))
1033 (global $g1 (mut v128) (v128.const i32x4 4 5 6 7))
1034 (global $g2 (mut v128) (v128.const i32x4 8 9 10 11))
1035 (global $g3 (mut v128) (v128.const i32x4 12 13 14 15))
1036 (global $g4 (mut v128) (v128.const i32x4 16 17 18 19))
1037
1038 (func $set_g0 (export "as-global.set_value_$g0") (param $0 v128)
1039 (global.set $g0 (local.get $0))
1040 )
1041 (func $set_g1_g2 (export "as-global.set_value_$g1_$g2") (param $0 v128) (param $1 v128)
1042 (global.set $g1 (local.get $0))
1043 (global.set $g2 (local.get $1))
1044 )
1045 (func $set_g0_g1_g2_g3 (export "as-global.set_value_$g0_$g1_$g2_$g3") (param $0 v128) (param $1 v128) (param $2 v128) (param $3 v128)
1046 (call $set_g0 (local.get $0))
1047 (call $set_g1_g2 (local.get $1) (local.get $2))
1048 (global.set $g3 (local.get $3))
1049 )
1050 (func (export "global.get_g0") (result v128)
1051 (global.get $g0)
1052 )
1053 (func (export "global.get_g1") (result v128)
1054 (global.get $g1)
1055 )
1056 (func (export "global.get_g2") (result v128)
1057 (global.get $g2)
1058 )
1059 (func (export "global.get_g3") (result v128)
1060 (global.get $g3)
1061 )
1062)
1063
1064(assert_return (invoke "as-global.set_value_$g0_$g1_$g2_$g3" (v128.const i32x4 1 1 1 1)
1065 (v128.const i32x4 2 2 2 2)
1066 (v128.const i32x4 3 3 3 3)
1067 (v128.const i32x4 4 4 4 4)))
1068(assert_return (invoke "global.get_g0") (v128.const i32x4 1 1 1 1))
1069(assert_return (invoke "global.get_g1") (v128.const i32x4 2 2 2 2))
1070(assert_return (invoke "global.get_g2") (v128.const i32x4 3 3 3 3))
1071(assert_return (invoke "global.get_g3") (v128.const i32x4 4 4 4 4))
1072
1073
1074;; Test integer literal parsing.
1075
1076(module
1077 (func (export "i32x4.test") (result v128) (return (v128.const i32x4 0x0bAdD00D 0x0bAdD00D 0x0bAdD00D 0x0bAdD00D)))
1078 (func (export "i32x4.smax") (result v128) (return (v128.const i32x4 0x7fffffff 0x7fffffff 0x7fffffff 0x7fffffff)))
1079 (func (export "i32x4.neg_smax") (result v128) (return (v128.const i32x4 -0x7fffffff -0x7fffffff -0x7fffffff -0x7fffffff)))
1080 (func (export "i32x4.inc_smin") (result v128) (return (i32x4.add (v128.const i32x4 -0x80000000 -0x80000000 -0x80000000 -0x80000000) (v128.const i32x4 1 1 1 1))))
1081 (func (export "i32x4.neg_zero") (result v128) (return (v128.const i32x4 -0x0 -0x0 -0x0 -0x0)))
1082 (func (export "i32x4.not_octal") (result v128) (return (v128.const i32x4 010 010 010 010)))
1083 (func (export "i32x4.plus_sign") (result v128) (return (v128.const i32x4 +42 +42 +42 +42)))
1084
1085 (func (export "i32x4-dec-sep1") (result v128) (v128.const i32x4 1_000_000 1_000_000 1_000_000 1_000_000))
1086 (func (export "i32x4-dec-sep2") (result v128) (v128.const i32x4 1_0_0_0 1_0_0_0 1_0_0_0 1_0_0_0))
1087 (func (export "i32x4-hex-sep1") (result v128) (v128.const i32x4 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99))
1088 (func (export "i32x4-hex-sep2") (result v128) (v128.const i32x4 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f))
1089
1090 (func (export "i64x2.test") (result v128) (return (v128.const i64x2 0x0bAdD00D0bAdD00D 0x0bAdD00D0bAdD00D)))
1091 (func (export "i64x2.smax") (result v128) (return (v128.const i64x2 0x7fffffffffffffff 0x7fffffffffffffff)))
1092 (func (export "i64x2.neg_smax") (result v128) (return (v128.const i64x2 -0x7fffffffffffffff -0x7fffffffffffffff)))
1093 (func (export "i64x2.inc_smin") (result v128) (return (i64x2.add (v128.const i64x2 -0x8000000000000000 -0x8000000000000000) (v128.const i64x2 1 1))))
1094 (func (export "i64x2.neg_zero") (result v128) (return (v128.const i64x2 -0x0 -0x0)))
1095 (func (export "i64x2.not_octal") (result v128) (return (v128.const i64x2 010010 010010)))
1096 (func (export "i64x2.plus_sign") (result v128) (return (v128.const i64x2 +42 +42)))
1097
1098 (func (export "i64x2-dec-sep1") (result v128) (v128.const i64x2 10_000_000_000_000 10_000_000_000_000))
1099 (func (export "i64x2-dec-sep2") (result v128) (v128.const i64x2 1_0_0_0_0_0_0_0 1_0_0_0_0_0_0_0))
1100 (func (export "i64x2-hex-sep1") (result v128) (v128.const i64x2 0xa_0f_00_99_0a_0f_00_99 0xa_0f_00_99_0a_0f_00_99))
1101 (func (export "i64x2-hex-sep2") (result v128) (v128.const i64x2 0x1_a_A_0_f_1_a_A_0_f 0x1_a_A_0_f_1_a_A_0_f))
1102)
1103
1104(assert_return (invoke "i32x4.test") (v128.const i32x4 195940365 195940365 195940365 195940365))
1105(assert_return (invoke "i32x4.smax") (v128.const i32x4 2147483647 2147483647 2147483647 2147483647))
1106(assert_return (invoke "i32x4.neg_smax") (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
1107(assert_return (invoke "i32x4.inc_smin") (v128.const i32x4 -2147483647 -2147483647 -2147483647 -2147483647))
1108(assert_return (invoke "i32x4.neg_zero") (v128.const i32x4 0 0 0 0))
1109(assert_return (invoke "i32x4.not_octal") (v128.const i32x4 10 10 10 10))
1110(assert_return (invoke "i32x4.plus_sign") (v128.const i32x4 42 42 42 42))
1111
1112(assert_return (invoke "i32x4-dec-sep1") (v128.const i32x4 1000000 1000000 1000000 1000000))
1113(assert_return (invoke "i32x4-dec-sep2") (v128.const i32x4 1000 1000 1000 1000))
1114(assert_return (invoke "i32x4-hex-sep1") (v128.const i32x4 0xa0f0099 0xa0f0099 0xa0f0099 0xa0f0099))
1115(assert_return (invoke "i32x4-hex-sep2") (v128.const i32x4 0x1aa0f 0x1aa0f 0x1aa0f 0x1aa0f))
1116
1117(assert_return (invoke "i64x2.test") (v128.const i64x2 841557459837243405 841557459837243405))
1118(assert_return (invoke "i64x2.smax") (v128.const i64x2 9223372036854775807 9223372036854775807))
1119(assert_return (invoke "i64x2.neg_smax") (v128.const i64x2 -9223372036854775807 -9223372036854775807))
1120(assert_return (invoke "i64x2.inc_smin") (v128.const i64x2 -9223372036854775807 -9223372036854775807))
1121(assert_return (invoke "i64x2.neg_zero") (v128.const i64x2 0 0))
1122(assert_return (invoke "i64x2.not_octal") (v128.const i64x2 10010 10010))
1123(assert_return (invoke "i64x2.plus_sign") (v128.const i64x2 42 42))
1124
1125(assert_return (invoke "i64x2-dec-sep1") (v128.const i64x2 10000000000000 10000000000000))
1126(assert_return (invoke "i64x2-dec-sep2") (v128.const i64x2 10000000 10000000))
1127(assert_return (invoke "i64x2-hex-sep1") (v128.const i64x2 0xa0f00990a0f0099 0xa0f00990a0f0099))
1128(assert_return (invoke "i64x2-hex-sep2") (v128.const i64x2 0x1aa0f1aa0f 0x1aa0f1aa0f))
1129
1130(assert_malformed
1131 (module quote "(global v128 (v128.const i32x4 _100 _100 _100 _100))")
1132 "unknown operator"
1133)
1134(assert_malformed
1135 (module quote "(global v128 (v128.const i32x4 +_100 +_100 +_100 +_100))")
1136 "unknown operator"
1137)
1138(assert_malformed
1139 (module quote "(global v128 (v128.const i32x4 -_100 -_100 -_100 -_100))")
1140 "unknown operator"
1141)
1142(assert_malformed
1143 (module quote "(global v128 (v128.const i32x4 99_ 99_ 99_ 99_))")
1144 "unknown operator"
1145)
1146(assert_malformed
1147 (module quote "(global v128 (v128.const i32x4 1__000 1__000 1__000 1__000))")
1148 "unknown operator"
1149)
1150(assert_malformed
1151 (module quote "(global v128 (v128.const i32x4 _0x100 _0x100 _0x100 _0x100))")
1152 "unknown operator"
1153)
1154(assert_malformed
1155 (module quote "(global v128 (v128.const i32x4 0_x100 0_x100 0_x100 0_x100))")
1156 "unknown operator"
1157)
1158(assert_malformed
1159 (module quote "(global v128 (v128.const i32x4 0x_100 0x_100 0x_100 0x_100))")
1160 "unknown operator"
1161)
1162(assert_malformed
1163 (module quote "(global v128 (v128.const i32x4 0x00_ 0x00_ 0x00_ 0x00_))")
1164 "unknown operator"
1165)
1166(assert_malformed
1167 (module quote "(global v128 (v128.const i32x4 0xff__ffff 0xff__ffff 0xff__ffff 0xff__ffff))")
1168 "unknown operator"
1169)
1170
1171(assert_malformed
1172 (module quote "(global v128 (v128.const i64x2 _100_100 _100_100))")
1173 "unknown operator"
1174)
1175(assert_malformed
1176 (module quote "(global v128 (v128.const i64x2 +_100_100 +_100_100))")
1177 "unknown operator"
1178)
1179(assert_malformed
1180 (module quote "(global v128 (v128.const i64x2 -_100_100 -_100_100))")
1181 "unknown operator"
1182)
1183(assert_malformed
1184 (module quote "(global v128 (v128.const i64x2 99_99_ 99_99_))")
1185 "unknown operator"
1186)
1187(assert_malformed
1188 (module quote "(global v128 (v128.const i64x2 1__000_000 1__000_000))")
1189 "unknown operator"
1190)
1191(assert_malformed
1192 (module quote "(global v128 (v128.const i64x2 _0x100000 _0x100000))")
1193 "unknown operator"
1194)
1195(assert_malformed
1196 (module quote "(global v128 (v128.const i64x2 0_x100000 0_x100000))")
1197 "unknown operator"
1198)
1199(assert_malformed
1200 (module quote "(global v128 (v128.const i64x2 0x_100000 0x_100000))")
1201 "unknown operator"
1202)
1203(assert_malformed
1204 (module quote "(global v128 (v128.const i64x2 0x00_ 0x00_))")
1205 "unknown operator"
1206)
1207(assert_malformed
1208 (module quote "(global v128 (v128.const i64x2 0xff__ffff_ffff_ffff 0xff__ffff_ffff_ffff))")
1209 "unknown operator"
1210)
1211
1212;; Test floating-point literal parsing.
1213
1214(module
1215 (func (export "f32-dec-sep1") (result v128) (v128.const f32x4 1_000_000 1_000_000 1_000_000 1_000_000))
1216 (func (export "f32-dec-sep2") (result v128) (v128.const f32x4 1_0_0_0 1_0_0_0 1_0_0_0 1_0_0_0))
1217 (func (export "f32-dec-sep3") (result v128) (v128.const f32x4 100_3.141_592 100_3.141_592 100_3.141_592 100_3.141_592))
1218 (func (export "f32-dec-sep4") (result v128) (v128.const f32x4 99e+1_3 99e+1_3 99e+1_3 99e+1_3))
1219 (func (export "f32-dec-sep5") (result v128) (v128.const f32x4 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3))
1220 (func (export "f32-hex-sep1") (result v128) (v128.const f32x4 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99 0xa_0f_00_99))
1221 (func (export "f32-hex-sep2") (result v128) (v128.const f32x4 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f 0x1_a_A_0_f))
1222 (func (export "f32-hex-sep3") (result v128) (v128.const f32x4 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a))
1223 (func (export "f32-hex-sep4") (result v128) (v128.const f32x4 0xf0P+1_3 0xf0P+1_3 0xf0P+1_3 0xf0P+1_3))
1224 (func (export "f32-hex-sep5") (result v128) (v128.const f32x4 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3))
1225 (func (export "f64-dec-sep1") (result v128) (v128.const f64x2 1_000_000 1_000_000))
1226 (func (export "f64-dec-sep2") (result v128) (v128.const f64x2 1_0_0_0 1_0_0_0))
1227 (func (export "f64-dec-sep3") (result v128) (v128.const f64x2 100_3.141_592 100_3.141_592))
1228 (func (export "f64-dec-sep4") (result v128) (v128.const f64x2 99e+1_3 99e+1_3))
1229 (func (export "f64-dec-sep5") (result v128) (v128.const f64x2 122_000.11_3_54E0_2_3 122_000.11_3_54E0_2_3))
1230 (func (export "f64-hex-sep1") (result v128) (v128.const f64x2 0xa_0f_00_99 0xa_0f_00_99))
1231 (func (export "f64-hex-sep2") (result v128) (v128.const f64x2 0x1_a_A_0_f 0x1_a_A_0_f))
1232 (func (export "f64-hex-sep3") (result v128) (v128.const f64x2 0xa0_ff.f141_a59a 0xa0_ff.f141_a59a))
1233 (func (export "f64-hex-sep4") (result v128) (v128.const f64x2 0xf0P+1_3 0xf0P+1_3))
1234 (func (export "f64-hex-sep5") (result v128) (v128.const f64x2 0x2a_f00a.1f_3_eep2_3 0x2a_f00a.1f_3_eep2_3))
1235)
1236
1237(assert_return (invoke "f32-dec-sep1") (v128.const f32x4 1000000 1000000 1000000 1000000))
1238(assert_return (invoke "f32-dec-sep2") (v128.const f32x4 1000 1000 1000 1000))
1239(assert_return (invoke "f32-dec-sep3") (v128.const f32x4 1003.141592 1003.141592 1003.141592 1003.141592))
1240(assert_return (invoke "f32-dec-sep4") (v128.const f32x4 99e+13 99e+13 99e+13 99e+13))
1241(assert_return (invoke "f32-dec-sep5") (v128.const f32x4 122000.11354e23 122000.11354e23 122000.11354e23 122000.11354e23))
1242(assert_return (invoke "f32-hex-sep1") (v128.const f32x4 0xa0f0099 0xa0f0099 0xa0f0099 0xa0f0099))
1243(assert_return (invoke "f32-hex-sep2") (v128.const f32x4 0x1aa0f 0x1aa0f 0x1aa0f 0x1aa0f))
1244(assert_return (invoke "f32-hex-sep3") (v128.const f32x4 0xa0ff.f141a59a 0xa0ff.f141a59a 0xa0ff.f141a59a 0xa0ff.f141a59a))
1245(assert_return (invoke "f32-hex-sep4") (v128.const f32x4 0xf0P+13 0xf0P+13 0xf0P+13 0xf0P+13))
1246(assert_return (invoke "f32-hex-sep5") (v128.const f32x4 0x2af00a.1f3eep23 0x2af00a.1f3eep23 0x2af00a.1f3eep23 0x2af00a.1f3eep23))
1247(assert_return (invoke "f64-dec-sep1") (v128.const f64x2 1000000 1000000))
1248(assert_return (invoke "f64-dec-sep2") (v128.const f64x2 1000 1000))
1249(assert_return (invoke "f64-dec-sep3") (v128.const f64x2 1003.141592 1003.141592))
1250(assert_return (invoke "f64-dec-sep4") (v128.const f64x2 99e+13 99e+13))
1251(assert_return (invoke "f64-dec-sep5") (v128.const f64x2 122000.11354e23 122000.11354e23))
1252(assert_return (invoke "f64-hex-sep1") (v128.const f64x2 0xa0f0099 0xa0f0099))
1253(assert_return (invoke "f64-hex-sep2") (v128.const f64x2 0x1aa0f 0x1aa0f))
1254(assert_return (invoke "f64-hex-sep3") (v128.const f64x2 0xa0ff.f141a59a 0xa0ff.f141a59a))
1255(assert_return (invoke "f64-hex-sep4") (v128.const f64x2 0xf0P+13 0xf0P+13))
1256(assert_return (invoke "f64-hex-sep5") (v128.const f64x2 0x2af00a.1f3eep23 0x2af00a.1f3eep23))
1257
1258(assert_malformed
1259 (module quote "(global v128 (v128.const f32x4 _100 _100 _100 _100))")
1260 "unknown operator"
1261)
1262(assert_malformed
1263 (module quote "(global v128 (v128.const f32x4 +_100 +_100 +_100 +_100))")
1264 "unknown operator"
1265)
1266(assert_malformed
1267 (module quote "(global v128 (v128.const f32x4 -_100 -_100 -_100 -_100))")
1268 "unknown operator"
1269)
1270(assert_malformed
1271 (module quote "(global v128 (v128.const f32x4 99_ 99_ 99_ 99_))")
1272 "unknown operator"
1273)
1274(assert_malformed
1275 (module quote "(global v128 (v128.const f32x4 1__000 1__000 1__000 1__000))")
1276 "unknown operator"
1277)
1278(assert_malformed
1279 (module quote "(global v128 (v128.const f32x4 _1.0 _1.0 _1.0 _1.0))")
1280 "unknown operator"
1281)
1282(assert_malformed
1283 (module quote "(global v128 (v128.const f32x4 1.0_ 1.0_ 1.0_ 1.0_))")
1284 "unknown operator"
1285)
1286(assert_malformed
1287 (module quote "(global v128 (v128.const f32x4 1_.0 1_.0 1_.0 1_.0))")
1288 "unknown operator"
1289)
1290(assert_malformed
1291 (module quote "(global v128 (v128.const f32x4 1._0 1._0 1._0 1._0))")
1292 "unknown operator"
1293)
1294(assert_malformed
1295 (module quote "(global v128 (v128.const f32x4 _1e1 _1e1 _1e1 _1e1))")
1296 "unknown operator"
1297)
1298(assert_malformed
1299 (module quote "(global v128 (v128.const f32x4 1e1_ 1e1_ 1e1_ 1e1_))")
1300 "unknown operator"
1301)
1302(assert_malformed
1303 (module quote "(global v128 (v128.const f32x4 1_e1 1_e1 1_e1 1_e1))")
1304 "unknown operator"
1305)
1306(assert_malformed
1307 (module quote "(global v128 (v128.const f32x4 1e_1 1e_1 1e_1 1e_1))")
1308 "unknown operator"
1309)
1310(assert_malformed
1311 (module quote "(global v128 (v128.const f32x4 _1.0e1 _1.0e1 _1.0e1 _1.0e1))")
1312 "unknown operator"
1313)
1314(assert_malformed
1315 (module quote "(global v128 (v128.const f32x4 1.0e1_ 1.0e1_ 1.0e1_ 1.0e1_))")
1316 "unknown operator"
1317)
1318(assert_malformed
1319 (module quote "(global v128 (v128.const f32x4 1.0_e1 1.0_e1 1.0_e1 1.0_e1))")
1320 "unknown operator"
1321)
1322(assert_malformed
1323 (module quote "(global v128 (v128.const f32x4 1.0e_1 1.0e_1 1.0e_1 1.0e_1))")
1324 "unknown operator"
1325)
1326(assert_malformed
1327 (module quote "(global v128 (v128.const f32x4 1.0e+_1 1.0e+_1 1.0e+_1 1.0e+_1))")
1328 "unknown operator"
1329)
1330(assert_malformed
1331 (module quote "(global v128 (v128.const f32x4 1.0e_+1 1.0e_+1 1.0e_+1 1.0e_+1))")
1332 "unknown operator"
1333)
1334(assert_malformed
1335 (module quote "(global v128 (v128.const f32x4 _0x100 _0x100 _0x100 _0x100))")
1336 "unknown operator"
1337)
1338(assert_malformed
1339 (module quote "(global v128 (v128.const f32x4 0_x100 0_x100 0_x100 0_x100))")
1340 "unknown operator"
1341)
1342(assert_malformed
1343 (module quote "(global v128 (v128.const f32x4 0x_100 0x_100 0x_100 0x_100))")
1344 "unknown operator"
1345)
1346(assert_malformed
1347 (module quote "(global v128 (v128.const f32x4 0x00_ 0x00_ 0x00_ 0x00_))")
1348 "unknown operator"
1349)
1350(assert_malformed
1351 (module quote "(global v128 (v128.const f32x4 0xff__ffff 0xff__ffff 0xff__ffff 0xff__ffff))")
1352 "unknown operator"
1353)
1354(assert_malformed
1355 (module quote "(global v128 (v128.const f32x4 0x_1.0 0x_1.0 0x_1.0 0x_1.0))")
1356 "unknown operator"
1357)
1358(assert_malformed
1359 (module quote "(global v128 (v128.const f32x4 0x1.0_ 0x1.0_ 0x1.0_ 0x1.0_))")
1360 "unknown operator"
1361)
1362(assert_malformed
1363 (module quote "(global v128 (v128.const f32x4 0x1_.0 0x1_.0 0x1_.0 0x1_.0))")
1364 "unknown operator"
1365)
1366(assert_malformed
1367 (module quote "(global v128 (v128.const f32x4 0x1._0 0x1._0 0x1._0 0x1._0))")
1368 "unknown operator"
1369)
1370(assert_malformed
1371 (module quote "(global v128 (v128.const f32x4 0x_1p1 0x_1p1 0x_1p1 0x_1p1))")
1372 "unknown operator"
1373)
1374(assert_malformed
1375 (module quote "(global v128 (v128.const f32x4 0x1p1_ 0x1p1_ 0x1p1_ 0x1p1_))")
1376 "unknown operator"
1377)
1378(assert_malformed
1379 (module quote "(global v128 (v128.const f32x4 0x1_p1 0x1_p1 0x1_p1 0x1_p1))")
1380 "unknown operator"
1381)
1382(assert_malformed
1383 (module quote "(global v128 (v128.const f32x4 0x1p_1 0x1p_1 0x1p_1 0x1p_1))")
1384 "unknown operator"
1385)
1386(assert_malformed
1387 (module quote "(global v128 (v128.const f32x4 0x_1.0p1 0x_1.0p1 0x_1.0p1 0x_1.0p1))")
1388 "unknown operator"
1389)
1390(assert_malformed
1391 (module quote "(global v128 (v128.const f32x4 0x1.0p1_ 0x1.0p1_ 0x1.0p1_ 0x1.0p1_))")
1392 "unknown operator"
1393)
1394(assert_malformed
1395 (module quote "(global v128 (v128.const f32x4 0x1.0_p1 0x1.0_p1 0x1.0_p1 0x1.0_p1))")
1396 "unknown operator"
1397)
1398(assert_malformed
1399 (module quote "(global v128 (v128.const f32x4 0x1.0p_1 0x1.0p_1 0x1.0p_1 0x1.0p_1))")
1400 "unknown operator"
1401)
1402(assert_malformed
1403 (module quote "(global v128 (v128.const f32x4 0x1.0p+_1 0x1.0p+_1 0x1.0p+_1 0x1.0p+_1))")
1404 "unknown operator"
1405)
1406(assert_malformed
1407 (module quote "(global v128 (v128.const f32x4 0x1.0p_+1 0x1.0p_+1 0x1.0p_+1 0x1.0p_+1))")
1408 "unknown operator"
1409)
1410
1411(assert_malformed
1412 (module quote "(global v128 (v128.const f64x2 _100 _100))")
1413 "unknown operator"
1414)
1415(assert_malformed
1416 (module quote "(global v128 (v128.const f64x2 +_100 +_100))")
1417 "unknown operator"
1418)
1419(assert_malformed
1420 (module quote "(global v128 (v128.const f64x2 -_100 -_100))")
1421 "unknown operator"
1422)
1423(assert_malformed
1424 (module quote "(global v128 (v128.const f64x2 99_ 99_))")
1425 "unknown operator"
1426)
1427(assert_malformed
1428 (module quote "(global v128 (v128.const f64x2 1__000 1__000))")
1429 "unknown operator"
1430)
1431(assert_malformed
1432 (module quote "(global v128 (v128.const f64x2 _1.0 _1.0))")
1433 "unknown operator"
1434)
1435(assert_malformed
1436 (module quote "(global v128 (v128.const f64x2 1.0_ 1.0_))")
1437 "unknown operator"
1438)
1439(assert_malformed
1440 (module quote "(global v128 (v128.const f64x2 1_.0 1_.0))")
1441 "unknown operator"
1442)
1443(assert_malformed
1444 (module quote "(global v128 (v128.const f64x2 1._0 1._0))")
1445 "unknown operator"
1446)
1447(assert_malformed
1448 (module quote "(global v128 (v128.const f64x2 _1e1 _1e1))")
1449 "unknown operator"
1450)
1451(assert_malformed
1452 (module quote "(global v128 (v128.const f64x2 1e1_ 1e1_))")
1453 "unknown operator"
1454)
1455(assert_malformed
1456 (module quote "(global v128 (v128.const f64x2 1_e1 1_e1))")
1457 "unknown operator"
1458)
1459(assert_malformed
1460 (module quote "(global v128 (v128.const f64x2 1e_1 1e_1))")
1461 "unknown operator"
1462)
1463(assert_malformed
1464 (module quote "(global v128 (v128.const f64x2 _1.0e1 _1.0e1))")
1465 "unknown operator"
1466)
1467(assert_malformed
1468 (module quote "(global v128 (v128.const f64x2 1.0e1_ 1.0e1_))")
1469 "unknown operator"
1470)
1471(assert_malformed
1472 (module quote "(global v128 (v128.const f64x2 1.0_e1 1.0_e1))")
1473 "unknown operator"
1474)
1475(assert_malformed
1476 (module quote "(global v128 (v128.const f64x2 1.0e_1 1.0e_1))")
1477 "unknown operator"
1478)
1479(assert_malformed
1480 (module quote "(global v128 (v128.const f64x2 1.0e+_1 1.0e+_1))")
1481 "unknown operator"
1482)
1483(assert_malformed
1484 (module quote "(global v128 (v128.const f64x2 1.0e_+1 1.0e_+1))")
1485 "unknown operator"
1486)
1487(assert_malformed
1488 (module quote "(global v128 (v128.const f64x2 _0x100 _0x100))")
1489 "unknown operator"
1490)
1491(assert_malformed
1492 (module quote "(global v128 (v128.const f64x2 0_x100 0_x100))")
1493 "unknown operator"
1494)
1495(assert_malformed
1496 (module quote "(global v128 (v128.const f64x2 0x_100 0x_100))")
1497 "unknown operator"
1498)
1499(assert_malformed
1500 (module quote "(global v128 (v128.const f64x2 0x00_ 0x00_))")
1501 "unknown operator"
1502)
1503(assert_malformed
1504 (module quote "(global v128 (v128.const f64x2 0xff__ffff 0xff__ffff))")
1505 "unknown operator"
1506)
1507(assert_malformed
1508 (module quote "(global v128 (v128.const f64x2 0x_1.0 0x_1.0))")
1509 "unknown operator"
1510)
1511(assert_malformed
1512 (module quote "(global v128 (v128.const f64x2 0x1.0_ 0x1.0_))")
1513 "unknown operator"
1514)
1515(assert_malformed
1516 (module quote "(global v128 (v128.const f64x2 0x1_.0 0x1_.0))")
1517 "unknown operator"
1518)
1519(assert_malformed
1520 (module quote "(global v128 (v128.const f64x2 0x1._0 0x1._0))")
1521 "unknown operator"
1522)
1523(assert_malformed
1524 (module quote "(global v128 (v128.const f64x2 0x_1p1 0x_1p1))")
1525 "unknown operator"
1526)
1527(assert_malformed
1528 (module quote "(global v128 (v128.const f64x2 0x1p1_ 0x1p1_))")
1529 "unknown operator"
1530)
1531(assert_malformed
1532 (module quote "(global v128 (v128.const f64x2 0x1_p1 0x1_p1))")
1533 "unknown operator"
1534)
1535(assert_malformed
1536 (module quote "(global v128 (v128.const f64x2 0x1p_1 0x1p_1))")
1537 "unknown operator"
1538)
1539(assert_malformed
1540 (module quote "(global v128 (v128.const f64x2 0x_1.0p1 0x_1.0p1))")
1541 "unknown operator"
1542)
1543(assert_malformed
1544 (module quote "(global v128 (v128.const f64x2 0x1.0p1_ 0x1.0p1_))")
1545 "unknown operator"
1546)
1547(assert_malformed
1548 (module quote "(global v128 (v128.const f64x2 0x1.0_p1 0x1.0_p1))")
1549 "unknown operator"
1550)
1551(assert_malformed
1552 (module quote "(global v128 (v128.const f64x2 0x1.0p_1 0x1.0p_1))")
1553 "unknown operator"
1554)
1555(assert_malformed
1556 (module quote "(global v128 (v128.const f64x2 0x1.0p+_1 0x1.0p+_1))")
1557 "unknown operator"
1558)
1559(assert_malformed
1560 (module quote "(global v128 (v128.const f64x2 0x1.0p_+1 0x1.0p_+1))")
1561 "unknown operator"
1562)
1563
1564;; Test parsing an integer from binary
1565
1566(module binary
1567 "\00asm" "\01\00\00\00"
1568 "\01\05\01" ;; type section
1569 "\60\00\01\7b" ;; type 0 (func)
1570 "\03\02\01\00" ;; func section
1571 "\07\0f\01\0b" ;; export section
1572 "\70\61\72\73\65\5f\69\38\78\31\36\00\00" ;; export name (parse_i8x16)
1573 "\0a\16\01" ;; code section
1574 "\14\00\fd\0c" ;; func body
1575 "\00\00\00\00" ;; data lane 0~3 (0, 0, 0, 0)
1576 "\80\80\80\80" ;; data lane 4~7 (-128, -128, -128, -128)
1577 "\ff\ff\ff\ff" ;; data lane 8~11 (0xff, 0xff, 0xff, 0xff)
1578 "\ff\ff\ff\ff" ;; data lane 12~15 (255, 255, 255, 255)
1579 "\0b" ;; end
1580)
1581(assert_return (invoke "parse_i8x16") (v128.const i8x16 0 0 0 0 -128 -128 -128 -128 0xff 0xff 0xff 0xff 255 255 255 255))
1582
1583(module binary
1584 "\00asm" "\01\00\00\00"
1585 "\01\05\01" ;; type section
1586 "\60\00\01\7b" ;; type 0 (func)
1587 "\03\02\01\00" ;; func section
1588 "\07\0f\01\0b" ;; export section
1589 "\70\61\72\73\65\5f\69\31\36\78\38\00\00" ;; export name (parse_i16x8)
1590 "\0a\16\01" ;; code section
1591 "\14\00\fd\0c" ;; func body
1592 "\00\00\00\00" ;; data lane 0, 1 (0, 0)
1593 "\00\80\00\80" ;; data lane 2, 3 (-32768, -32768)
1594 "\ff\ff\ff\ff" ;; data lane 4, 5 (65535, 65535)
1595 "\ff\ff\ff\ff" ;; data lane 6, 7 (0xffff, 0xffff)
1596 "\0b" ;; end
1597)
1598(assert_return (invoke "parse_i16x8") (v128.const i16x8 0 0 -32768 -32768 65535 65535 0xffff 0xffff))
1599
1600(module binary
1601 "\00asm" "\01\00\00\00"
1602 "\01\05\01" ;; type section
1603 "\60\00\01\7b" ;; type 0 (func)
1604 "\03\02\01\00" ;; func section
1605 "\07\0f\01\0b" ;; export section
1606 "\70\61\72\73\65\5f\69\33\32\78\34\00\00" ;; export name (parse_i32x4)
1607 "\0a\16\01" ;; code section
1608 "\14\00\fd\0c" ;; func body
1609 "\d1\ff\ff\ff" ;; data lane 0 (4294967249)
1610 "\d1\ff\ff\ff" ;; data lane 1 (4294967249)
1611 "\d1\ff\ff\ff" ;; data lane 2 (4294967249)
1612 "\d1\ff\ff\ff" ;; data lane 3 (4294967249)
1613 "\0b" ;; end
1614)
1615(assert_return (invoke "parse_i32x4") (v128.const i32x4 4294967249 4294967249 4294967249 4294967249))
1616
1617(module binary
1618 "\00asm" "\01\00\00\00"
1619 "\01\05\01" ;; type section
1620 "\60\00\01\7b" ;; type 0 (func)
1621 "\03\02\01\00" ;; func section
1622 "\07\0f\01\0b" ;; export section
1623 "\70\61\72\73\65\5f\69\36\34\78\32\00\00" ;; export name (parse_i64x2)
1624 "\0a\16\01" ;; code section
1625 "\14\00\fd\0c" ;; func body
1626 "\ff\ff\ff\ff\ff\ff\ff\7f" ;; data lane 0 (9223372036854775807)
1627 "\ff\ff\ff\ff\ff\ff\ff\7f" ;; data lane 1 (9223372036854775807)
1628 "\0b" ;; end
1629)
1630(assert_return (invoke "parse_i64x2") (v128.const i64x2 9223372036854775807 9223372036854775807))
1631
1632;; Test parsing a float from binary
1633
1634(module binary
1635 "\00asm" "\01\00\00\00"
1636 "\01\05\01" ;; type section
1637 "\60\00\01\7b" ;; type 0 (func)
1638 "\03\02\01\00" ;; func section
1639 "\07\0f\01\0b" ;; export section
1640 "\70\61\72\73\65\5f\66\33\32\78\34\00\00" ;; export name (parse_f32x4)
1641 "\0a\16\01" ;; code section
1642 "\14\00\fd\0c" ;; func body
1643 "\00\00\80\4f" ;; data lane 0 (4294967249)
1644 "\00\00\80\4f" ;; data lane 1 (4294967249)
1645 "\00\00\80\4f" ;; data lane 2 (4294967249)
1646 "\00\00\80\4f" ;; data lane 3 (4294967249)
1647 "\0b" ;; end
1648)
1649(assert_return (invoke "parse_f32x4") (v128.const f32x4 4294967249 4294967249 4294967249 4294967249))
1650
1651(module binary
1652 "\00asm" "\01\00\00\00"
1653 "\01\05\01" ;; type section
1654 "\60\00\01\7b" ;; type 0 (func)
1655 "\03\02\01\00" ;; func section
1656 "\07\0f\01\0b" ;; export section
1657 "\70\61\72\73\65\5f\66\36\34\78\32\00\00" ;; export name (parse_f64x2)
1658 "\0a\16\01" ;; code section
1659 "\14\00\fd\0c" ;; func body
1660 "\ff\ff\ff\ff\ff\ff\ef\7f" ;; data lane 0 (0x1.fffffffffffffp+1023)
1661 "\ff\ff\ff\ff\ff\ff\ef\7f" ;; data lane 1 (0x1.fffffffffffffp+1023)
1662 "\0b" ;; end
1663)
1664(assert_return (invoke "parse_f64x2") (v128.const f64x2 0x1.fffffffffffffp+1023 0x1.fffffffffffffp+1023))
View as plain text