binaryArithmeticTests.wast 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318
  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. (func
  7. (export "func_i32x4_add_3")
  8. (param i32 i32 i32 i32 i32 i32 i32 i32)
  9. (result i32)
  10. (local i32x4 i32x4 i32x4)
  11. (set_local
  12. 8
  13. (i32x4.build
  14. (get_local 0)
  15. (get_local 1)
  16. (get_local 2)
  17. (get_local 3)
  18. )
  19. )
  20. (set_local
  21. 9
  22. (i32x4.build
  23. (get_local 4)
  24. (get_local 5)
  25. (get_local 6)
  26. (get_local 7)
  27. )
  28. )
  29. (set_local
  30. 10
  31. (i32x4.add
  32. (get_local 8)
  33. (get_local 9)
  34. )
  35. )
  36. (i32x4.extractLane
  37. (get_local 10)
  38. (i32.const 3)
  39. )
  40. )
  41. (func
  42. (export "func_i32x4_sub_3")
  43. (param i32 i32 i32 i32 i32 i32 i32 i32)
  44. (result i32)
  45. (local i32x4 i32x4 i32x4)
  46. (set_local
  47. 8
  48. (i32x4.build
  49. (get_local 0)
  50. (get_local 1)
  51. (get_local 2)
  52. (get_local 3)
  53. )
  54. )
  55. (set_local
  56. 9
  57. (i32x4.build
  58. (get_local 4)
  59. (get_local 5)
  60. (get_local 6)
  61. (get_local 7)
  62. )
  63. )
  64. (set_local
  65. 10
  66. (i32x4.sub
  67. (get_local 8)
  68. (get_local 9)
  69. )
  70. )
  71. (i32x4.extractLane
  72. (get_local 10)
  73. (i32.const 3)
  74. )
  75. )
  76. (func
  77. (export "func_i32x4_mul_3")
  78. (param i32 i32 i32 i32 i32 i32 i32 i32)
  79. (result i32)
  80. (local i32x4 i32x4 i32x4)
  81. (set_local
  82. 8
  83. (i32x4.build
  84. (get_local 0)
  85. (get_local 1)
  86. (get_local 2)
  87. (get_local 3)
  88. )
  89. )
  90. (set_local
  91. 9
  92. (i32x4.build
  93. (get_local 4)
  94. (get_local 5)
  95. (get_local 6)
  96. (get_local 7)
  97. )
  98. )
  99. (set_local
  100. 10
  101. (i32x4.mul
  102. (get_local 8)
  103. (get_local 9)
  104. )
  105. )
  106. (i32x4.extractLane
  107. (get_local 10)
  108. (i32.const 3)
  109. )
  110. )
  111. (func
  112. (export "func_i32x4_shl_3")
  113. (param i32 i32 i32 i32 i32)
  114. (result i32)
  115. (local i32x4)
  116. (set_local
  117. 5
  118. (i32x4.build
  119. (get_local 0)
  120. (get_local 1)
  121. (get_local 2)
  122. (get_local 3)
  123. )
  124. )
  125. (set_local
  126. 5
  127. (i32x4.shl
  128. (get_local 5)
  129. (get_local 4)
  130. )
  131. )
  132. (i32x4.extractLane
  133. (get_local 5)
  134. (i32.const 3)
  135. )
  136. )
  137. (func
  138. (export "func_i32x4_shr_3_s")
  139. (param i32 i32 i32 i32 i32)
  140. (result i32)
  141. (local i32x4)
  142. (set_local
  143. 5
  144. (i32x4.build
  145. (get_local 0)
  146. (get_local 1)
  147. (get_local 2)
  148. (get_local 3)
  149. )
  150. )
  151. (set_local
  152. 5
  153. (i32x4.shr_s
  154. (get_local 5)
  155. (get_local 4)
  156. )
  157. )
  158. (i32x4.extractLane
  159. (get_local 5)
  160. (i32.const 3)
  161. )
  162. )
  163. (func
  164. (export "func_i32x4_shr_3_u")
  165. (param i32 i32 i32 i32 i32)
  166. (result i32)
  167. (local i32x4)
  168. (set_local
  169. 5
  170. (i32x4.build
  171. (get_local 0)
  172. (get_local 1)
  173. (get_local 2)
  174. (get_local 3)
  175. )
  176. )
  177. (set_local
  178. 5
  179. (i32x4.shr_u
  180. (get_local 5)
  181. (get_local 4)
  182. )
  183. )
  184. (i32x4.extractLane
  185. (get_local 5)
  186. (i32.const 3)
  187. )
  188. )
  189. (func
  190. (export "func_i16x8_add_3_u")
  191. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  192. (result i32)
  193. (local i16x8 i16x8 i16x8)
  194. (set_local
  195. 16
  196. (i16x8.build
  197. (get_local 0)
  198. (get_local 1)
  199. (get_local 2)
  200. (get_local 3)
  201. (get_local 4)
  202. (get_local 5)
  203. (get_local 6)
  204. (get_local 7)
  205. )
  206. )
  207. (set_local
  208. 17
  209. (i16x8.build
  210. (get_local 8)
  211. (get_local 9)
  212. (get_local 10)
  213. (get_local 11)
  214. (get_local 12)
  215. (get_local 13)
  216. (get_local 14)
  217. (get_local 15)
  218. )
  219. )
  220. (set_local
  221. 18
  222. (i16x8.add
  223. (get_local 16)
  224. (get_local 17)
  225. )
  226. )
  227. (i16x8.extractLane_u
  228. (get_local 18)
  229. (i32.const 3)
  230. )
  231. )
  232. (func
  233. (export "func_i16x8_addsaturate_3_s_u")
  234. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  235. (result i32)
  236. (local i16x8 i16x8 i16x8)
  237. (set_local
  238. 16
  239. (i16x8.build
  240. (get_local 0)
  241. (get_local 1)
  242. (get_local 2)
  243. (get_local 3)
  244. (get_local 4)
  245. (get_local 5)
  246. (get_local 6)
  247. (get_local 7)
  248. )
  249. )
  250. (set_local
  251. 17
  252. (i16x8.build
  253. (get_local 8)
  254. (get_local 9)
  255. (get_local 10)
  256. (get_local 11)
  257. (get_local 12)
  258. (get_local 13)
  259. (get_local 14)
  260. (get_local 15)
  261. )
  262. )
  263. (set_local
  264. 18
  265. (i16x8.addsaturate_s
  266. (get_local 16)
  267. (get_local 17)
  268. )
  269. )
  270. (i16x8.extractLane_u
  271. (get_local 18)
  272. (i32.const 3)
  273. )
  274. )
  275. (func
  276. (export "func_i16x8_addsaturate_3_u_u")
  277. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  278. (result i32)
  279. (local i16x8 i16x8 i16x8)
  280. (set_local
  281. 16
  282. (i16x8.build
  283. (get_local 0)
  284. (get_local 1)
  285. (get_local 2)
  286. (get_local 3)
  287. (get_local 4)
  288. (get_local 5)
  289. (get_local 6)
  290. (get_local 7)
  291. )
  292. )
  293. (set_local
  294. 17
  295. (i16x8.build
  296. (get_local 8)
  297. (get_local 9)
  298. (get_local 10)
  299. (get_local 11)
  300. (get_local 12)
  301. (get_local 13)
  302. (get_local 14)
  303. (get_local 15)
  304. )
  305. )
  306. (set_local
  307. 18
  308. (i16x8.addsaturate_u
  309. (get_local 16)
  310. (get_local 17)
  311. )
  312. )
  313. (i16x8.extractLane_u
  314. (get_local 18)
  315. (i32.const 3)
  316. )
  317. )
  318. (func
  319. (export "func_i16x8_sub_3_u")
  320. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  321. (result i32)
  322. (local i16x8 i16x8 i16x8)
  323. (set_local
  324. 16
  325. (i16x8.build
  326. (get_local 0)
  327. (get_local 1)
  328. (get_local 2)
  329. (get_local 3)
  330. (get_local 4)
  331. (get_local 5)
  332. (get_local 6)
  333. (get_local 7)
  334. )
  335. )
  336. (set_local
  337. 17
  338. (i16x8.build
  339. (get_local 8)
  340. (get_local 9)
  341. (get_local 10)
  342. (get_local 11)
  343. (get_local 12)
  344. (get_local 13)
  345. (get_local 14)
  346. (get_local 15)
  347. )
  348. )
  349. (set_local
  350. 18
  351. (i16x8.sub
  352. (get_local 16)
  353. (get_local 17)
  354. )
  355. )
  356. (i16x8.extractLane_u
  357. (get_local 18)
  358. (i32.const 3)
  359. )
  360. )
  361. (func
  362. (export "func_i16x8_subsaturate_3_s_u")
  363. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  364. (result i32)
  365. (local i16x8 i16x8 i16x8)
  366. (set_local
  367. 16
  368. (i16x8.build
  369. (get_local 0)
  370. (get_local 1)
  371. (get_local 2)
  372. (get_local 3)
  373. (get_local 4)
  374. (get_local 5)
  375. (get_local 6)
  376. (get_local 7)
  377. )
  378. )
  379. (set_local
  380. 17
  381. (i16x8.build
  382. (get_local 8)
  383. (get_local 9)
  384. (get_local 10)
  385. (get_local 11)
  386. (get_local 12)
  387. (get_local 13)
  388. (get_local 14)
  389. (get_local 15)
  390. )
  391. )
  392. (set_local
  393. 18
  394. (i16x8.subsaturate_s
  395. (get_local 16)
  396. (get_local 17)
  397. )
  398. )
  399. (i16x8.extractLane_u
  400. (get_local 18)
  401. (i32.const 3)
  402. )
  403. )
  404. (func
  405. (export "func_i16x8_subsaturate_3_u_u")
  406. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  407. (result i32)
  408. (local i16x8 i16x8 i16x8)
  409. (set_local
  410. 16
  411. (i16x8.build
  412. (get_local 0)
  413. (get_local 1)
  414. (get_local 2)
  415. (get_local 3)
  416. (get_local 4)
  417. (get_local 5)
  418. (get_local 6)
  419. (get_local 7)
  420. )
  421. )
  422. (set_local
  423. 17
  424. (i16x8.build
  425. (get_local 8)
  426. (get_local 9)
  427. (get_local 10)
  428. (get_local 11)
  429. (get_local 12)
  430. (get_local 13)
  431. (get_local 14)
  432. (get_local 15)
  433. )
  434. )
  435. (set_local
  436. 18
  437. (i16x8.subsaturate_u
  438. (get_local 16)
  439. (get_local 17)
  440. )
  441. )
  442. (i16x8.extractLane_u
  443. (get_local 18)
  444. (i32.const 3)
  445. )
  446. )
  447. (func
  448. (export "func_i16x8_mul_3_u")
  449. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  450. (result i32)
  451. (local i16x8 i16x8 i16x8)
  452. (set_local
  453. 16
  454. (i16x8.build
  455. (get_local 0)
  456. (get_local 1)
  457. (get_local 2)
  458. (get_local 3)
  459. (get_local 4)
  460. (get_local 5)
  461. (get_local 6)
  462. (get_local 7)
  463. )
  464. )
  465. (set_local
  466. 17
  467. (i16x8.build
  468. (get_local 8)
  469. (get_local 9)
  470. (get_local 10)
  471. (get_local 11)
  472. (get_local 12)
  473. (get_local 13)
  474. (get_local 14)
  475. (get_local 15)
  476. )
  477. )
  478. (set_local
  479. 18
  480. (i16x8.mul
  481. (get_local 16)
  482. (get_local 17)
  483. )
  484. )
  485. (i16x8.extractLane_u
  486. (get_local 18)
  487. (i32.const 3)
  488. )
  489. )
  490. (func
  491. (export "func_i16x8_shl_3_u")
  492. (param i32 i32 i32 i32 i32 i32 i32 i32 i32)
  493. (result i32)
  494. (local i16x8)
  495. (set_local
  496. 9
  497. (i16x8.build
  498. (get_local 0)
  499. (get_local 1)
  500. (get_local 2)
  501. (get_local 3)
  502. (get_local 4)
  503. (get_local 5)
  504. (get_local 6)
  505. (get_local 7)
  506. )
  507. )
  508. (set_local
  509. 9
  510. (i16x8.shl
  511. (get_local 9)
  512. (get_local 8)
  513. )
  514. )
  515. (i16x8.extractLane_u
  516. (get_local 9)
  517. (i32.const 3)
  518. )
  519. )
  520. (func
  521. (export "func_i16x8_shr_3_s_u")
  522. (param i32 i32 i32 i32 i32 i32 i32 i32 i32)
  523. (result i32)
  524. (local i16x8)
  525. (set_local
  526. 9
  527. (i16x8.build
  528. (get_local 0)
  529. (get_local 1)
  530. (get_local 2)
  531. (get_local 3)
  532. (get_local 4)
  533. (get_local 5)
  534. (get_local 6)
  535. (get_local 7)
  536. )
  537. )
  538. (set_local
  539. 9
  540. (i16x8.shr_s
  541. (get_local 9)
  542. (get_local 8)
  543. )
  544. )
  545. (i16x8.extractLane_u
  546. (get_local 9)
  547. (i32.const 3)
  548. )
  549. )
  550. (func
  551. (export "func_i16x8_shr_3_u_u")
  552. (param i32 i32 i32 i32 i32 i32 i32 i32 i32)
  553. (result i32)
  554. (local i16x8)
  555. (set_local
  556. 9
  557. (i16x8.build
  558. (get_local 0)
  559. (get_local 1)
  560. (get_local 2)
  561. (get_local 3)
  562. (get_local 4)
  563. (get_local 5)
  564. (get_local 6)
  565. (get_local 7)
  566. )
  567. )
  568. (set_local
  569. 9
  570. (i16x8.shr_u
  571. (get_local 9)
  572. (get_local 8)
  573. )
  574. )
  575. (i16x8.extractLane_u
  576. (get_local 9)
  577. (i32.const 3)
  578. )
  579. )
  580. (func
  581. (export "func_i8x16_add_3_u")
  582. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  583. (result i32)
  584. (local i8x16 i8x16 i8x16)
  585. (set_local
  586. 32
  587. (i8x16.build
  588. (get_local 0)
  589. (get_local 1)
  590. (get_local 2)
  591. (get_local 3)
  592. (get_local 4)
  593. (get_local 5)
  594. (get_local 6)
  595. (get_local 7)
  596. (get_local 8)
  597. (get_local 9)
  598. (get_local 10)
  599. (get_local 11)
  600. (get_local 12)
  601. (get_local 13)
  602. (get_local 14)
  603. (get_local 15)
  604. )
  605. )
  606. (set_local
  607. 33
  608. (i8x16.build
  609. (get_local 16)
  610. (get_local 17)
  611. (get_local 18)
  612. (get_local 19)
  613. (get_local 20)
  614. (get_local 21)
  615. (get_local 22)
  616. (get_local 23)
  617. (get_local 24)
  618. (get_local 25)
  619. (get_local 26)
  620. (get_local 27)
  621. (get_local 28)
  622. (get_local 29)
  623. (get_local 30)
  624. (get_local 31)
  625. )
  626. )
  627. (set_local
  628. 34
  629. (i8x16.add
  630. (get_local 32)
  631. (get_local 33)
  632. )
  633. )
  634. (i8x16.extractLane_u
  635. (get_local 34)
  636. (i32.const 3)
  637. )
  638. )
  639. (func
  640. (export "func_i8x16_addsaturate_3_s_u")
  641. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  642. (result i32)
  643. (local i8x16 i8x16 i8x16)
  644. (set_local
  645. 32
  646. (i8x16.build
  647. (get_local 0)
  648. (get_local 1)
  649. (get_local 2)
  650. (get_local 3)
  651. (get_local 4)
  652. (get_local 5)
  653. (get_local 6)
  654. (get_local 7)
  655. (get_local 8)
  656. (get_local 9)
  657. (get_local 10)
  658. (get_local 11)
  659. (get_local 12)
  660. (get_local 13)
  661. (get_local 14)
  662. (get_local 15)
  663. )
  664. )
  665. (set_local
  666. 33
  667. (i8x16.build
  668. (get_local 16)
  669. (get_local 17)
  670. (get_local 18)
  671. (get_local 19)
  672. (get_local 20)
  673. (get_local 21)
  674. (get_local 22)
  675. (get_local 23)
  676. (get_local 24)
  677. (get_local 25)
  678. (get_local 26)
  679. (get_local 27)
  680. (get_local 28)
  681. (get_local 29)
  682. (get_local 30)
  683. (get_local 31)
  684. )
  685. )
  686. (set_local
  687. 34
  688. (i8x16.addsaturate_s
  689. (get_local 32)
  690. (get_local 33)
  691. )
  692. )
  693. (i8x16.extractLane_u
  694. (get_local 34)
  695. (i32.const 3)
  696. )
  697. )
  698. (func
  699. (export "func_i8x16_addsaturate_3_u_u")
  700. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  701. (result i32)
  702. (local i8x16 i8x16 i8x16)
  703. (set_local
  704. 32
  705. (i8x16.build
  706. (get_local 0)
  707. (get_local 1)
  708. (get_local 2)
  709. (get_local 3)
  710. (get_local 4)
  711. (get_local 5)
  712. (get_local 6)
  713. (get_local 7)
  714. (get_local 8)
  715. (get_local 9)
  716. (get_local 10)
  717. (get_local 11)
  718. (get_local 12)
  719. (get_local 13)
  720. (get_local 14)
  721. (get_local 15)
  722. )
  723. )
  724. (set_local
  725. 33
  726. (i8x16.build
  727. (get_local 16)
  728. (get_local 17)
  729. (get_local 18)
  730. (get_local 19)
  731. (get_local 20)
  732. (get_local 21)
  733. (get_local 22)
  734. (get_local 23)
  735. (get_local 24)
  736. (get_local 25)
  737. (get_local 26)
  738. (get_local 27)
  739. (get_local 28)
  740. (get_local 29)
  741. (get_local 30)
  742. (get_local 31)
  743. )
  744. )
  745. (set_local
  746. 34
  747. (i8x16.addsaturate_u
  748. (get_local 32)
  749. (get_local 33)
  750. )
  751. )
  752. (i8x16.extractLane_u
  753. (get_local 34)
  754. (i32.const 3)
  755. )
  756. )
  757. (func
  758. (export "func_i8x16_sub_3_u")
  759. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  760. (result i32)
  761. (local i8x16 i8x16 i8x16)
  762. (set_local
  763. 32
  764. (i8x16.build
  765. (get_local 0)
  766. (get_local 1)
  767. (get_local 2)
  768. (get_local 3)
  769. (get_local 4)
  770. (get_local 5)
  771. (get_local 6)
  772. (get_local 7)
  773. (get_local 8)
  774. (get_local 9)
  775. (get_local 10)
  776. (get_local 11)
  777. (get_local 12)
  778. (get_local 13)
  779. (get_local 14)
  780. (get_local 15)
  781. )
  782. )
  783. (set_local
  784. 33
  785. (i8x16.build
  786. (get_local 16)
  787. (get_local 17)
  788. (get_local 18)
  789. (get_local 19)
  790. (get_local 20)
  791. (get_local 21)
  792. (get_local 22)
  793. (get_local 23)
  794. (get_local 24)
  795. (get_local 25)
  796. (get_local 26)
  797. (get_local 27)
  798. (get_local 28)
  799. (get_local 29)
  800. (get_local 30)
  801. (get_local 31)
  802. )
  803. )
  804. (set_local
  805. 34
  806. (i8x16.sub
  807. (get_local 32)
  808. (get_local 33)
  809. )
  810. )
  811. (i8x16.extractLane_u
  812. (get_local 34)
  813. (i32.const 3)
  814. )
  815. )
  816. (func
  817. (export "func_i8x16_subsaturate_3_s_u")
  818. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  819. (result i32)
  820. (local i8x16 i8x16 i8x16)
  821. (set_local
  822. 32
  823. (i8x16.build
  824. (get_local 0)
  825. (get_local 1)
  826. (get_local 2)
  827. (get_local 3)
  828. (get_local 4)
  829. (get_local 5)
  830. (get_local 6)
  831. (get_local 7)
  832. (get_local 8)
  833. (get_local 9)
  834. (get_local 10)
  835. (get_local 11)
  836. (get_local 12)
  837. (get_local 13)
  838. (get_local 14)
  839. (get_local 15)
  840. )
  841. )
  842. (set_local
  843. 33
  844. (i8x16.build
  845. (get_local 16)
  846. (get_local 17)
  847. (get_local 18)
  848. (get_local 19)
  849. (get_local 20)
  850. (get_local 21)
  851. (get_local 22)
  852. (get_local 23)
  853. (get_local 24)
  854. (get_local 25)
  855. (get_local 26)
  856. (get_local 27)
  857. (get_local 28)
  858. (get_local 29)
  859. (get_local 30)
  860. (get_local 31)
  861. )
  862. )
  863. (set_local
  864. 34
  865. (i8x16.subsaturate_s
  866. (get_local 32)
  867. (get_local 33)
  868. )
  869. )
  870. (i8x16.extractLane_u
  871. (get_local 34)
  872. (i32.const 3)
  873. )
  874. )
  875. (func
  876. (export "func_i8x16_subsaturate_3_u_u")
  877. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  878. (result i32)
  879. (local i8x16 i8x16 i8x16)
  880. (set_local
  881. 32
  882. (i8x16.build
  883. (get_local 0)
  884. (get_local 1)
  885. (get_local 2)
  886. (get_local 3)
  887. (get_local 4)
  888. (get_local 5)
  889. (get_local 6)
  890. (get_local 7)
  891. (get_local 8)
  892. (get_local 9)
  893. (get_local 10)
  894. (get_local 11)
  895. (get_local 12)
  896. (get_local 13)
  897. (get_local 14)
  898. (get_local 15)
  899. )
  900. )
  901. (set_local
  902. 33
  903. (i8x16.build
  904. (get_local 16)
  905. (get_local 17)
  906. (get_local 18)
  907. (get_local 19)
  908. (get_local 20)
  909. (get_local 21)
  910. (get_local 22)
  911. (get_local 23)
  912. (get_local 24)
  913. (get_local 25)
  914. (get_local 26)
  915. (get_local 27)
  916. (get_local 28)
  917. (get_local 29)
  918. (get_local 30)
  919. (get_local 31)
  920. )
  921. )
  922. (set_local
  923. 34
  924. (i8x16.subsaturate_u
  925. (get_local 32)
  926. (get_local 33)
  927. )
  928. )
  929. (i8x16.extractLane_u
  930. (get_local 34)
  931. (i32.const 3)
  932. )
  933. )
  934. (func
  935. (export "func_i8x16_mul_3_u")
  936. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  937. (result i32)
  938. (local i8x16 i8x16 i8x16)
  939. (set_local
  940. 32
  941. (i8x16.build
  942. (get_local 0)
  943. (get_local 1)
  944. (get_local 2)
  945. (get_local 3)
  946. (get_local 4)
  947. (get_local 5)
  948. (get_local 6)
  949. (get_local 7)
  950. (get_local 8)
  951. (get_local 9)
  952. (get_local 10)
  953. (get_local 11)
  954. (get_local 12)
  955. (get_local 13)
  956. (get_local 14)
  957. (get_local 15)
  958. )
  959. )
  960. (set_local
  961. 33
  962. (i8x16.build
  963. (get_local 16)
  964. (get_local 17)
  965. (get_local 18)
  966. (get_local 19)
  967. (get_local 20)
  968. (get_local 21)
  969. (get_local 22)
  970. (get_local 23)
  971. (get_local 24)
  972. (get_local 25)
  973. (get_local 26)
  974. (get_local 27)
  975. (get_local 28)
  976. (get_local 29)
  977. (get_local 30)
  978. (get_local 31)
  979. )
  980. )
  981. (set_local
  982. 34
  983. (i8x16.mul
  984. (get_local 32)
  985. (get_local 33)
  986. )
  987. )
  988. (i8x16.extractLane_u
  989. (get_local 34)
  990. (i32.const 3)
  991. )
  992. )
  993. (func
  994. (export "func_i8x16_shl_3_u")
  995. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  996. (result i32)
  997. (local i8x16)
  998. (set_local
  999. 17
  1000. (i8x16.build
  1001. (get_local 0)
  1002. (get_local 1)
  1003. (get_local 2)
  1004. (get_local 3)
  1005. (get_local 4)
  1006. (get_local 5)
  1007. (get_local 6)
  1008. (get_local 7)
  1009. (get_local 8)
  1010. (get_local 9)
  1011. (get_local 10)
  1012. (get_local 11)
  1013. (get_local 12)
  1014. (get_local 13)
  1015. (get_local 14)
  1016. (get_local 15)
  1017. )
  1018. )
  1019. (set_local
  1020. 17
  1021. (i8x16.shl
  1022. (get_local 17)
  1023. (get_local 16)
  1024. )
  1025. )
  1026. (i8x16.extractLane_u
  1027. (get_local 17)
  1028. (i32.const 3)
  1029. )
  1030. )
  1031. (func
  1032. (export "func_i8x16_shr_3_s_u")
  1033. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  1034. (result i32)
  1035. (local i8x16)
  1036. (set_local
  1037. 17
  1038. (i8x16.build
  1039. (get_local 0)
  1040. (get_local 1)
  1041. (get_local 2)
  1042. (get_local 3)
  1043. (get_local 4)
  1044. (get_local 5)
  1045. (get_local 6)
  1046. (get_local 7)
  1047. (get_local 8)
  1048. (get_local 9)
  1049. (get_local 10)
  1050. (get_local 11)
  1051. (get_local 12)
  1052. (get_local 13)
  1053. (get_local 14)
  1054. (get_local 15)
  1055. )
  1056. )
  1057. (set_local
  1058. 17
  1059. (i8x16.shr_s
  1060. (get_local 17)
  1061. (get_local 16)
  1062. )
  1063. )
  1064. (i8x16.extractLane_u
  1065. (get_local 17)
  1066. (i32.const 3)
  1067. )
  1068. )
  1069. (func
  1070. (export "func_i8x16_shr_3_u_u")
  1071. (param i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32)
  1072. (result i32)
  1073. (local i8x16)
  1074. (set_local
  1075. 17
  1076. (i8x16.build
  1077. (get_local 0)
  1078. (get_local 1)
  1079. (get_local 2)
  1080. (get_local 3)
  1081. (get_local 4)
  1082. (get_local 5)
  1083. (get_local 6)
  1084. (get_local 7)
  1085. (get_local 8)
  1086. (get_local 9)
  1087. (get_local 10)
  1088. (get_local 11)
  1089. (get_local 12)
  1090. (get_local 13)
  1091. (get_local 14)
  1092. (get_local 15)
  1093. )
  1094. )
  1095. (set_local
  1096. 17
  1097. (i8x16.shr_u
  1098. (get_local 17)
  1099. (get_local 16)
  1100. )
  1101. )
  1102. (i8x16.extractLane_u
  1103. (get_local 17)
  1104. (i32.const 3)
  1105. )
  1106. )
  1107. (func
  1108. (export "func_f32x4_add_3")
  1109. (param f32 f32 f32 f32 f32 f32 f32 f32)
  1110. (result f32)
  1111. (local f32x4 f32x4 f32x4)
  1112. (set_local
  1113. 8
  1114. (f32x4.build
  1115. (get_local 0)
  1116. (get_local 1)
  1117. (get_local 2)
  1118. (get_local 3)
  1119. )
  1120. )
  1121. (set_local
  1122. 9
  1123. (f32x4.build
  1124. (get_local 4)
  1125. (get_local 5)
  1126. (get_local 6)
  1127. (get_local 7)
  1128. )
  1129. )
  1130. (set_local
  1131. 10
  1132. (f32x4.add
  1133. (get_local 8)
  1134. (get_local 9)
  1135. )
  1136. )
  1137. (f32x4.extractLane
  1138. (get_local 10)
  1139. (i32.const 3)
  1140. )
  1141. )
  1142. (func
  1143. (export "func_f32x4_sub_3")
  1144. (param f32 f32 f32 f32 f32 f32 f32 f32)
  1145. (result f32)
  1146. (local f32x4 f32x4 f32x4)
  1147. (set_local
  1148. 8
  1149. (f32x4.build
  1150. (get_local 0)
  1151. (get_local 1)
  1152. (get_local 2)
  1153. (get_local 3)
  1154. )
  1155. )
  1156. (set_local
  1157. 9
  1158. (f32x4.build
  1159. (get_local 4)
  1160. (get_local 5)
  1161. (get_local 6)
  1162. (get_local 7)
  1163. )
  1164. )
  1165. (set_local
  1166. 10
  1167. (f32x4.sub
  1168. (get_local 8)
  1169. (get_local 9)
  1170. )
  1171. )
  1172. (f32x4.extractLane
  1173. (get_local 10)
  1174. (i32.const 3)
  1175. )
  1176. )
  1177. (func
  1178. (export "func_f32x4_mul_3")
  1179. (param f32 f32 f32 f32 f32 f32 f32 f32)
  1180. (result f32)
  1181. (local f32x4 f32x4 f32x4)
  1182. (set_local
  1183. 8
  1184. (f32x4.build
  1185. (get_local 0)
  1186. (get_local 1)
  1187. (get_local 2)
  1188. (get_local 3)
  1189. )
  1190. )
  1191. (set_local
  1192. 9
  1193. (f32x4.build
  1194. (get_local 4)
  1195. (get_local 5)
  1196. (get_local 6)
  1197. (get_local 7)
  1198. )
  1199. )
  1200. (set_local
  1201. 10
  1202. (f32x4.mul
  1203. (get_local 8)
  1204. (get_local 9)
  1205. )
  1206. )
  1207. (f32x4.extractLane
  1208. (get_local 10)
  1209. (i32.const 3)
  1210. )
  1211. )
  1212. (func
  1213. (export "func_f32x4_div_3")
  1214. (param f32 f32 f32 f32 f32 f32 f32 f32)
  1215. (result f32)
  1216. (local f32x4 f32x4 f32x4)
  1217. (set_local
  1218. 8
  1219. (f32x4.build
  1220. (get_local 0)
  1221. (get_local 1)
  1222. (get_local 2)
  1223. (get_local 3)
  1224. )
  1225. )
  1226. (set_local
  1227. 9
  1228. (f32x4.build
  1229. (get_local 4)
  1230. (get_local 5)
  1231. (get_local 6)
  1232. (get_local 7)
  1233. )
  1234. )
  1235. (set_local
  1236. 10
  1237. (f32x4.div
  1238. (get_local 8)
  1239. (get_local 9)
  1240. )
  1241. )
  1242. (f32x4.extractLane
  1243. (get_local 10)
  1244. (i32.const 3)
  1245. )
  1246. )
  1247. (func
  1248. (export "func_f32x4_min_3")
  1249. (param f32 f32 f32 f32 f32 f32 f32 f32)
  1250. (result f32)
  1251. (local f32x4 f32x4 f32x4)
  1252. (set_local
  1253. 8
  1254. (f32x4.build
  1255. (get_local 0)
  1256. (get_local 1)
  1257. (get_local 2)
  1258. (get_local 3)
  1259. )
  1260. )
  1261. (set_local
  1262. 9
  1263. (f32x4.build
  1264. (get_local 4)
  1265. (get_local 5)
  1266. (get_local 6)
  1267. (get_local 7)
  1268. )
  1269. )
  1270. (set_local
  1271. 10
  1272. (f32x4.min
  1273. (get_local 8)
  1274. (get_local 9)
  1275. )
  1276. )
  1277. (f32x4.extractLane
  1278. (get_local 10)
  1279. (i32.const 3)
  1280. )
  1281. )
  1282. (func
  1283. (export "func_f32x4_max_3")
  1284. (param f32 f32 f32 f32 f32 f32 f32 f32)
  1285. (result f32)
  1286. (local f32x4 f32x4 f32x4)
  1287. (set_local
  1288. 8
  1289. (f32x4.build
  1290. (get_local 0)
  1291. (get_local 1)
  1292. (get_local 2)
  1293. (get_local 3)
  1294. )
  1295. )
  1296. (set_local
  1297. 9
  1298. (f32x4.build
  1299. (get_local 4)
  1300. (get_local 5)
  1301. (get_local 6)
  1302. (get_local 7)
  1303. )
  1304. )
  1305. (set_local
  1306. 10
  1307. (f32x4.max
  1308. (get_local 8)
  1309. (get_local 9)
  1310. )
  1311. )
  1312. (f32x4.extractLane
  1313. (get_local 10)
  1314. (i32.const 3)
  1315. )
  1316. )
  1317. )