2
0

comp.wast 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. ;;-------------------------------------------------------------------------------------------------------
  2. ;; Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. ;; Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ;;-------------------------------------------------------------------------------------------------------
  5. (module
  6. (import "dummy" "memory" (memory 1))
  7. (func (export "func_i32x4_compare_s") (param $2 i32)
  8. (block $label$0
  9. (block $label$1
  10. (block $label$2
  11. (block $label$3
  12. (block $label$4
  13. (block $label$5
  14. (br_if $label$5
  15. (i32.gt_u
  16. (get_local $2)
  17. (i32.const 5)
  18. )
  19. )
  20. (block $label$6
  21. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  22. (get_local $2)
  23. )
  24. )
  25. (v128.store offset=0 align=4 (i32.const 0)
  26. (i32x4.eq
  27. (v128.load offset=0 align=4 (i32.const 0))
  28. (v128.load offset=16 align=4 (i32.const 0))
  29. )
  30. )
  31. (return)
  32. )
  33. (unreachable) ;; invalid operation
  34. )
  35. (v128.store offset=0 align=4 (i32.const 0)
  36. (i32x4.ne
  37. (v128.load offset=0 align=4 (i32.const 0))
  38. (v128.load offset=16 align=4 (i32.const 0))
  39. )
  40. )
  41. (return)
  42. )
  43. (v128.store offset=0 align=4 (i32.const 0)
  44. (i32x4.lt_s
  45. (v128.load offset=0 align=4 (i32.const 0))
  46. (v128.load offset=16 align=4 (i32.const 0))
  47. )
  48. )
  49. (return)
  50. )
  51. (v128.store offset=0 align=4 (i32.const 0)
  52. (i32x4.le_s
  53. (v128.load offset=0 align=4 (i32.const 0))
  54. (v128.load offset=16 align=4 (i32.const 0))
  55. )
  56. )
  57. (return)
  58. )
  59. (v128.store offset=0 align=4 (i32.const 0)
  60. (i32x4.gt_s
  61. (v128.load offset=0 align=4 (i32.const 0))
  62. (v128.load offset=16 align=4 (i32.const 0))
  63. )
  64. )
  65. (return)
  66. )
  67. (v128.store offset=0 align=4 (i32.const 0)
  68. (i32x4.ge_s
  69. (v128.load offset=0 align=4 (i32.const 0))
  70. (v128.load offset=16 align=4 (i32.const 0))
  71. )
  72. )
  73. )
  74. (func (export "func_i32x4_compare_u") (param $2 i32)
  75. (block $label$0
  76. (block $label$1
  77. (block $label$2
  78. (block $label$3
  79. (block $label$4
  80. (block $label$5
  81. (br_if $label$5
  82. (i32.gt_u
  83. (get_local $2)
  84. (i32.const 5)
  85. )
  86. )
  87. (block $label$6
  88. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  89. (get_local $2)
  90. )
  91. )
  92. (v128.store offset=0 align=4 (i32.const 0)
  93. (i32x4.eq
  94. (v128.load offset=0 align=4 (i32.const 0))
  95. (v128.load offset=16 align=4 (i32.const 0))
  96. )
  97. )
  98. (return)
  99. )
  100. (unreachable) ;; invalid operation
  101. )
  102. (v128.store offset=0 align=4 (i32.const 0)
  103. (i32x4.ne
  104. (v128.load offset=0 align=4 (i32.const 0))
  105. (v128.load offset=16 align=4 (i32.const 0))
  106. )
  107. )
  108. (return)
  109. )
  110. (v128.store offset=0 align=4 (i32.const 0)
  111. (i32x4.lt_u
  112. (v128.load offset=0 align=4 (i32.const 0))
  113. (v128.load offset=16 align=4 (i32.const 0))
  114. )
  115. )
  116. (return)
  117. )
  118. (v128.store offset=0 align=4 (i32.const 0)
  119. (i32x4.le_u
  120. (v128.load offset=0 align=4 (i32.const 0))
  121. (v128.load offset=16 align=4 (i32.const 0))
  122. )
  123. )
  124. (return)
  125. )
  126. (v128.store offset=0 align=4 (i32.const 0)
  127. (i32x4.gt_u
  128. (v128.load offset=0 align=4 (i32.const 0))
  129. (v128.load offset=16 align=4 (i32.const 0))
  130. )
  131. )
  132. (return)
  133. )
  134. (v128.store offset=0 align=4 (i32.const 0)
  135. (i32x4.ge_u
  136. (v128.load offset=0 align=4 (i32.const 0))
  137. (v128.load offset=16 align=4 (i32.const 0))
  138. )
  139. )
  140. )
  141. (func (export "func_i16x8_compare_s") (param $2 i32)
  142. (block $label$0
  143. (block $label$1
  144. (block $label$2
  145. (block $label$3
  146. (block $label$4
  147. (block $label$5
  148. (br_if $label$5
  149. (i32.gt_u
  150. (get_local $2)
  151. (i32.const 5)
  152. )
  153. )
  154. (block $label$6
  155. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  156. (get_local $2)
  157. )
  158. )
  159. (v128.store offset=0 align=4 (i32.const 0)
  160. (i16x8.eq
  161. (v128.load offset=0 align=4 (i32.const 0))
  162. (v128.load offset=16 align=4 (i32.const 0))
  163. )
  164. )
  165. (return)
  166. )
  167. (unreachable) ;; invalid operation
  168. )
  169. (v128.store offset=0 align=4 (i32.const 0)
  170. (i16x8.ne
  171. (v128.load offset=0 align=4 (i32.const 0))
  172. (v128.load offset=16 align=4 (i32.const 0))
  173. )
  174. )
  175. (return)
  176. )
  177. (v128.store offset=0 align=4 (i32.const 0)
  178. (i16x8.lt_s
  179. (v128.load offset=0 align=4 (i32.const 0))
  180. (v128.load offset=16 align=4 (i32.const 0))
  181. )
  182. )
  183. (return)
  184. )
  185. (v128.store offset=0 align=4 (i32.const 0)
  186. (i16x8.le_s
  187. (v128.load offset=0 align=4 (i32.const 0))
  188. (v128.load offset=16 align=4 (i32.const 0))
  189. )
  190. )
  191. (return)
  192. )
  193. (v128.store offset=0 align=4 (i32.const 0)
  194. (i16x8.gt_s
  195. (v128.load offset=0 align=4 (i32.const 0))
  196. (v128.load offset=16 align=4 (i32.const 0))
  197. )
  198. )
  199. (return)
  200. )
  201. (v128.store offset=0 align=4 (i32.const 0)
  202. (i16x8.ge_s
  203. (v128.load offset=0 align=4 (i32.const 0))
  204. (v128.load offset=16 align=4 (i32.const 0))
  205. )
  206. )
  207. )
  208. (func (export "func_i16x8_compare_u") (param $2 i32)
  209. (block $label$0
  210. (block $label$1
  211. (block $label$2
  212. (block $label$3
  213. (block $label$4
  214. (block $label$5
  215. (br_if $label$5
  216. (i32.gt_u
  217. (get_local $2)
  218. (i32.const 5)
  219. )
  220. )
  221. (block $label$6
  222. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  223. (get_local $2)
  224. )
  225. )
  226. (v128.store offset=0 align=4 (i32.const 0)
  227. (i16x8.eq
  228. (v128.load offset=0 align=4 (i32.const 0))
  229. (v128.load offset=16 align=4 (i32.const 0))
  230. )
  231. )
  232. (return)
  233. )
  234. (unreachable) ;; invalid operation
  235. )
  236. (v128.store offset=0 align=4 (i32.const 0)
  237. (i16x8.ne
  238. (v128.load offset=0 align=4 (i32.const 0))
  239. (v128.load offset=16 align=4 (i32.const 0))
  240. )
  241. )
  242. (return)
  243. )
  244. (v128.store offset=0 align=4 (i32.const 0)
  245. (i16x8.lt_u
  246. (v128.load offset=0 align=4 (i32.const 0))
  247. (v128.load offset=16 align=4 (i32.const 0))
  248. )
  249. )
  250. (return)
  251. )
  252. (v128.store offset=0 align=4 (i32.const 0)
  253. (i16x8.le_u
  254. (v128.load offset=0 align=4 (i32.const 0))
  255. (v128.load offset=16 align=4 (i32.const 0))
  256. )
  257. )
  258. (return)
  259. )
  260. (v128.store offset=0 align=4 (i32.const 0)
  261. (i16x8.gt_u
  262. (v128.load offset=0 align=4 (i32.const 0))
  263. (v128.load offset=16 align=4 (i32.const 0))
  264. )
  265. )
  266. (return)
  267. )
  268. (v128.store offset=0 align=4 (i32.const 0)
  269. (i16x8.ge_u
  270. (v128.load offset=0 align=4 (i32.const 0))
  271. (v128.load offset=16 align=4 (i32.const 0))
  272. )
  273. )
  274. )
  275. (func (export "func_i8x16_compare_s") (param $2 i32)
  276. (block $label$0
  277. (block $label$1
  278. (block $label$2
  279. (block $label$3
  280. (block $label$4
  281. (block $label$5
  282. (br_if $label$5
  283. (i32.gt_u
  284. (get_local $2)
  285. (i32.const 5)
  286. )
  287. )
  288. (block $label$6
  289. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  290. (get_local $2)
  291. )
  292. )
  293. (v128.store offset=0 align=4 (i32.const 0)
  294. (i8x16.eq
  295. (v128.load offset=0 align=4 (i32.const 0))
  296. (v128.load offset=16 align=4 (i32.const 0))
  297. )
  298. )
  299. (return)
  300. )
  301. (unreachable) ;; invalid operation
  302. )
  303. (v128.store offset=0 align=4 (i32.const 0)
  304. (i8x16.ne
  305. (v128.load offset=0 align=4 (i32.const 0))
  306. (v128.load offset=16 align=4 (i32.const 0))
  307. )
  308. )
  309. (return)
  310. )
  311. (v128.store offset=0 align=4 (i32.const 0)
  312. (i8x16.lt_s
  313. (v128.load offset=0 align=4 (i32.const 0))
  314. (v128.load offset=16 align=4 (i32.const 0))
  315. )
  316. )
  317. (return)
  318. )
  319. (v128.store offset=0 align=4 (i32.const 0)
  320. (i8x16.le_s
  321. (v128.load offset=0 align=4 (i32.const 0))
  322. (v128.load offset=16 align=4 (i32.const 0))
  323. )
  324. )
  325. (return)
  326. )
  327. (v128.store offset=0 align=4 (i32.const 0)
  328. (i8x16.gt_s
  329. (v128.load offset=0 align=4 (i32.const 0))
  330. (v128.load offset=16 align=4 (i32.const 0))
  331. )
  332. )
  333. (return)
  334. )
  335. (v128.store offset=0 align=4 (i32.const 0)
  336. (i8x16.ge_s
  337. (v128.load offset=0 align=4 (i32.const 0))
  338. (v128.load offset=16 align=4 (i32.const 0))
  339. )
  340. )
  341. )
  342. (func (export "func_i8x16_compare_u") (param $2 i32)
  343. (block $label$0
  344. (block $label$1
  345. (block $label$2
  346. (block $label$3
  347. (block $label$4
  348. (block $label$5
  349. (br_if $label$5
  350. (i32.gt_u
  351. (get_local $2)
  352. (i32.const 5)
  353. )
  354. )
  355. (block $label$6
  356. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  357. (get_local $2)
  358. )
  359. )
  360. (v128.store offset=0 align=4 (i32.const 0)
  361. (i8x16.eq
  362. (v128.load offset=0 align=4 (i32.const 0))
  363. (v128.load offset=16 align=4 (i32.const 0))
  364. )
  365. )
  366. (return)
  367. )
  368. (unreachable) ;; invalid operation
  369. )
  370. (v128.store offset=0 align=4 (i32.const 0)
  371. (i8x16.ne
  372. (v128.load offset=0 align=4 (i32.const 0))
  373. (v128.load offset=16 align=4 (i32.const 0))
  374. )
  375. )
  376. (return)
  377. )
  378. (v128.store offset=0 align=4 (i32.const 0)
  379. (i8x16.lt_u
  380. (v128.load offset=0 align=4 (i32.const 0))
  381. (v128.load offset=16 align=4 (i32.const 0))
  382. )
  383. )
  384. (return)
  385. )
  386. (v128.store offset=0 align=4 (i32.const 0)
  387. (i8x16.le_u
  388. (v128.load offset=0 align=4 (i32.const 0))
  389. (v128.load offset=16 align=4 (i32.const 0))
  390. )
  391. )
  392. (return)
  393. )
  394. (v128.store offset=0 align=4 (i32.const 0)
  395. (i8x16.gt_u
  396. (v128.load offset=0 align=4 (i32.const 0))
  397. (v128.load offset=16 align=4 (i32.const 0))
  398. )
  399. )
  400. (return)
  401. )
  402. (v128.store offset=0 align=4 (i32.const 0)
  403. (i8x16.ge_u
  404. (v128.load offset=0 align=4 (i32.const 0))
  405. (v128.load offset=16 align=4 (i32.const 0))
  406. )
  407. )
  408. )
  409. (func (export "func_f32x4_compare") (param $2 i32)
  410. (block $label$0
  411. (block $label$1
  412. (block $label$2
  413. (block $label$3
  414. (block $label$4
  415. (block $label$5
  416. (br_if $label$5
  417. (i32.gt_u
  418. (get_local $2)
  419. (i32.const 5)
  420. )
  421. )
  422. (block $label$6
  423. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  424. (get_local $2)
  425. )
  426. )
  427. (v128.store offset=0 align=4 (i32.const 0)
  428. (f32x4.eq
  429. (v128.load offset=0 align=4 (i32.const 0))
  430. (v128.load offset=16 align=4 (i32.const 0))
  431. )
  432. )
  433. (return)
  434. )
  435. (unreachable) ;; invalid operation
  436. )
  437. (v128.store offset=0 align=4 (i32.const 0)
  438. (f32x4.ne
  439. (v128.load offset=0 align=4 (i32.const 0))
  440. (v128.load offset=16 align=4 (i32.const 0))
  441. )
  442. )
  443. (return)
  444. )
  445. (v128.store offset=0 align=4 (i32.const 0)
  446. (f32x4.lt
  447. (v128.load offset=0 align=4 (i32.const 0))
  448. (v128.load offset=16 align=4 (i32.const 0))
  449. )
  450. )
  451. (return)
  452. )
  453. (v128.store offset=0 align=4 (i32.const 0)
  454. (f32x4.le
  455. (v128.load offset=0 align=4 (i32.const 0))
  456. (v128.load offset=16 align=4 (i32.const 0))
  457. )
  458. )
  459. (return)
  460. )
  461. (v128.store offset=0 align=4 (i32.const 0)
  462. (f32x4.gt
  463. (v128.load offset=0 align=4 (i32.const 0))
  464. (v128.load offset=16 align=4 (i32.const 0))
  465. )
  466. )
  467. (return)
  468. )
  469. (v128.store offset=0 align=4 (i32.const 0)
  470. (f32x4.ge
  471. (v128.load offset=0 align=4 (i32.const 0))
  472. (v128.load offset=16 align=4 (i32.const 0))
  473. )
  474. )
  475. )
  476. (func (export "func_f64x2_compare") (param $2 i32)
  477. (block $label$0
  478. (block $label$1
  479. (block $label$2
  480. (block $label$3
  481. (block $label$4
  482. (block $label$5
  483. (br_if $label$5
  484. (i32.gt_u
  485. (get_local $2)
  486. (i32.const 5)
  487. )
  488. )
  489. (block $label$6
  490. (br_table $label$6 $label$4 $label$3 $label$2 $label$1 $label$0 $label$6
  491. (get_local $2)
  492. )
  493. )
  494. (v128.store offset=0 align=4 (i32.const 0)
  495. (f64x2.eq
  496. (v128.load offset=0 align=4 (i32.const 0))
  497. (v128.load offset=16 align=4 (i32.const 0))
  498. )
  499. )
  500. (return)
  501. )
  502. (unreachable) ;; invalid operation
  503. )
  504. (v128.store offset=0 align=4 (i32.const 0)
  505. (f64x2.ne
  506. (v128.load offset=0 align=4 (i32.const 0))
  507. (v128.load offset=16 align=4 (i32.const 0))
  508. )
  509. )
  510. (return)
  511. )
  512. (v128.store offset=0 align=4 (i32.const 0)
  513. (f64x2.lt
  514. (v128.load offset=0 align=4 (i32.const 0))
  515. (v128.load offset=16 align=4 (i32.const 0))
  516. )
  517. )
  518. (return)
  519. )
  520. (v128.store offset=0 align=4 (i32.const 0)
  521. (f64x2.le
  522. (v128.load offset=0 align=4 (i32.const 0))
  523. (v128.load offset=16 align=4 (i32.const 0))
  524. )
  525. )
  526. (return)
  527. )
  528. (v128.store offset=0 align=4 (i32.const 0)
  529. (f64x2.gt
  530. (v128.load offset=0 align=4 (i32.const 0))
  531. (v128.load offset=16 align=4 (i32.const 0))
  532. )
  533. )
  534. (return)
  535. )
  536. (v128.store offset=0 align=4 (i32.const 0)
  537. (f64x2.ge
  538. (v128.load offset=0 align=4 (i32.const 0))
  539. (v128.load offset=16 align=4 (i32.const 0))
  540. )
  541. )
  542. )
  543. )