forked from chakra-core/ChakraCore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmath.wast
More file actions
executable file
·322 lines (265 loc) · 15.5 KB
/
Copy pathmath.wast
File metadata and controls
executable file
·322 lines (265 loc) · 15.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
;;-------------------------------------------------------------------------------------------------------
;; Copyright (C) Microsoft Corporation and contributors. All rights reserved.
;; Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
;;-------------------------------------------------------------------------------------------------------
(module
(import "dummy" "memory" (memory 1))
(func (export "func_i8x16_shuffle_test0")
(local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
i32.const 0
get_local $v1
get_local $v2
v8x16.shuffle 0x1c1d1e1f 0x13021101 0x06050403 0x0a0b1415
v128.store offset=0 align=4
)
(func (export "func_i8x16_shuffle_test1")
(local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
i32.const 0
get_local $v1
get_local $v2
v8x16.shuffle 0x13121110 0x17161514 0x03020100 0x07060504
v128.store align=4
)
(func (export "func_i8x16_shuffle_test2")
(local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
i32.const 0
get_local 0
get_local 1
v8x16.shuffle 0x12011100 0x14031302 0x16051504 0x18071706
v128.store align=4
)
(func (export "func_i32x4_bitselect") (local $v1 v128) (local $v2 v128) (local $mask v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(set_local $mask (v128.load offset=0 align=4 (i32.const 32)))
(v128.store offset=0 align=4 (i32.const 0) (v128.bitselect (get_local $v1) (get_local $v2) (get_local $mask)))
)
(func (export "func_i32x4_add") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i32x4.add (get_local $v1) (get_local $v2)))
)
(func (export "func_i32x4_sub") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i32x4.sub (get_local $v1) (get_local $v2)))
)
(func (export "func_i32x4_mul") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i32x4.mul (get_local $v1) (get_local $v2)))
)
(func (export "func_i32x4_shl") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i32x4.shl (get_local $v1) (get_local $shamt)))
)
(func (export "func_i32x4_shr_s") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i32x4.shr_s (get_local $v1) (get_local $shamt)))
)
(func (export "func_i32x4_shr_u") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i32x4.shr_u (get_local $v1) (get_local $shamt)))
)
(func (export "func_i16x8_add") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.add (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_addsaturate_s") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.add_saturate_s (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_addsaturate_u") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.add_saturate_u (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_sub") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.sub (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_subsaturate_s") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.sub_saturate_s (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_subsaturate_u") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.sub_saturate_u (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_mul") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.mul (get_local $v1) (get_local $v2)))
)
(func (export "func_i16x8_shl") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.shl (get_local $v1) (get_local $shamt)))
)
(func (export "func_i16x8_shr_s") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.shr_s (get_local $v1) (get_local $shamt)))
)
(func (export "func_i16x8_shr_u") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i16x8.shr_u (get_local $v1) (get_local $shamt)))
)
(func (export "func_i8x16_add") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.add (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_addsaturate_s") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.add_saturate_s (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_addsaturate_u") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.add_saturate_u (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_sub") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.sub (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_subsaturate_s") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.sub_saturate_s (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_subsaturate_u") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.sub_saturate_u (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_mul") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.mul (get_local $v1) (get_local $v2)))
)
(func (export "func_i8x16_shl") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.shl (get_local $v1) (get_local $shamt)))
)
(func (export "func_i8x16_shr_s") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.shr_s (get_local $v1) (get_local $shamt)))
)
(func (export "func_i8x16_shr_u") (param $shamt i32) (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (i8x16.shr_u (get_local $v1) (get_local $shamt)))
)
(func (export "func_f32x4_add") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.add (get_local $v1) (get_local $v2)))
)
(func (export "func_f32x4_sub") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.sub (get_local $v1) (get_local $v2)))
)
(func (export "func_f32x4_mul") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.mul (get_local $v1) (get_local $v2)))
)
(func (export "func_f32x4_div") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.div (get_local $v1) (get_local $v2)))
)
(func (export "func_f32x4_min") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.min (get_local $v1) (get_local $v2)))
)
(func (export "func_f32x4_max") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.max (get_local $v1) (get_local $v2)))
)
(func (export "func_f32x4_abs") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.abs (get_local $v1)))
)
(func (export "func_f32x4_sqrt") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (f32x4.sqrt (get_local $v1)))
)
(func (export "func_f64x2_add") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.add (get_local $v1) (get_local $v2)))
)
(func (export "func_f64x2_sub") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.sub (get_local $v1) (get_local $v2)))
)
(func (export "func_f64x2_mul") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.mul (get_local $v1) (get_local $v2)))
)
(func (export "func_f64x2_div") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.div (get_local $v1) (get_local $v2)))
)
(func (export "func_f64x2_min") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.min (get_local $v1) (get_local $v2)))
)
(func (export "func_f64x2_max") (local $v1 v128) (local $v2 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(set_local $v2 (v128.load offset=0 align=4 (i32.const 16)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.max (get_local $v1) (get_local $v2)))
)
(func (export "func_f64x2_abs") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.abs (get_local $v1)))
)
(func (export "func_f64x2_sqrt") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.sqrt (get_local $v1)))
)
(func (export "func_i64x2_trunc_s") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (i64x2.trunc_s/f64x2:sat (get_local $v1)))
)
(func (export "func_i64x2_trunc_u") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (i64x2.trunc_u/f64x2:sat (get_local $v1)))
)
(func (export "func_f64x2_convert_s") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.convert_s/i64x2 (get_local $v1)))
)
(func (export "func_f64x2_convert_u") (local $v1 v128)
(set_local $v1 (v128.load offset=0 align=4 (i32.const 0)))
(v128.store offset=0 align=4 (i32.const 0) (f64x2.convert_u/i64x2 (get_local $v1)))
)
)