Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge SIMD proposal #1391

Merged
merged 463 commits into from
Nov 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
463 commits
Select commit Hold shift + click to select a range
89d1040
Move implementation of avgr_u into Int functor, require Rep to have t…
ngzhian Jun 25, 2020
d516baa
Fix typos, remove extra parens
ngzhian Jun 30, 2020
f372599
Merge pull request #260 from ngzhian/i16x8
ngzhian Jun 30, 2020
6987f8f
Add i8x16 support (#263)
ngzhian Jul 1, 2020
729c635
Merge remote-tracking branch 'upstream/master'
ngzhian Jul 1, 2020
9f1295a
Merge pull request #264 from ngzhian/master
ngzhian Jul 1, 2020
225a9b2
Implement 8x16 abs, min_{s,u}, max_{s,u}, avgr_u (#265)
ngzhian Jul 14, 2020
7ac7d92
Support I64x2 (#266)
ngzhian Jul 14, 2020
f65d981
Update v128.const implementation status for v8 (#268)
ngzhian Jul 14, 2020
b82988e
Implement v128 bitwise operations (#267)
ngzhian Jul 24, 2020
c8d539e
Implement v128 boolean operations (#270)
ngzhian Jul 24, 2020
5247c98
Add SIMD type and value (#269)
ngzhian Jul 24, 2020
129da6c
Implement SIMD splats using Convert (#274)
ngzhian Jul 27, 2020
5ef6087
Implement shl and shr_s for v128 (#272)
ngzhian Jul 27, 2020
0419529
Fix parsing of splat (#277)
ngzhian Jul 27, 2020
14772e3
Implement SIMD integer comparisons (#275)
ngzhian Jul 27, 2020
da8e260
Implement SIMD float comparisons (#276)
ngzhian Jul 27, 2020
5d24c2c
Setup Travis
binji Jul 27, 2020
ea4e9e0
Fix missing parser non-terminal rule for splat (#280)
ngzhian Jul 27, 2020
0e85e92
Set OCaml version to 4.08.1 (#279)
ngzhian Jul 27, 2020
766d7aa
Implement extract lane for the remaining shapes (#281)
ngzhian Aug 3, 2020
2bab880
Implement v128 load and store (#282)
ngzhian Aug 3, 2020
c75ca82
Implement v8x16.swizzle (#283)
ngzhian Aug 4, 2020
686463e
Implement i32x4 trunc sat and f32x4 convert (#285)
ngzhian Aug 4, 2020
377390a
Implement replace_lane for all shapes (#288)
ngzhian Aug 5, 2020
21b691f
Merge remote-tracking branch 'upstream/master' into master
ngzhian Aug 5, 2020
d51c515
Update lane index errors (#289)
ngzhian Aug 6, 2020
53e783e
Merge pull request #294 from ngzhian/master
ngzhian Aug 6, 2020
3426204
Fix SIMD trunc sat (#295)
ngzhian Aug 10, 2020
44e9f89
Validate lane index (#291)
ngzhian Aug 12, 2020
1f035fc
Implement shuffle (#292)
ngzhian Aug 12, 2020
49eda2a
Fix some of the shuffle related error messages (#299)
ngzhian Aug 12, 2020
3abad5d
Implement SIMD narrow and widen (#296)
ngzhian Aug 13, 2020
b9fcded
Clean up lane validation code in parser (#301)
ngzhian Aug 13, 2020
06bf5d7
Implement add_saturate_{sx} and sub_saturate_{sx} (#300)
ngzhian Aug 13, 2020
c8be84a
Implement some binary<->text support for SIMD (#298)
ngzhian Aug 13, 2020
0bed616
Implement binary<->text support for SIMD i8x16 i16x8 i32x4 arithmetic…
ngzhian Aug 14, 2020
6d60a67
Implement more binary<->text support for SIMD (#304)
ngzhian Aug 17, 2020
25462e6
Implement more binary<->text support for SIMD (#305)
ngzhian Aug 17, 2020
e57649a
Implement binary<->text support for SIMD f64x2 ops (#308)
ngzhian Aug 17, 2020
61eb66c
Implement more binary<->text support for SIMD (#309)
ngzhian Aug 17, 2020
d1d2214
Implement more binary<->text support for SIMD (#310)
ngzhian Aug 17, 2020
33b5210
Implement more binary<->text support for SIMD (#312)
ngzhian Aug 17, 2020
5e03088
Implement more binary<->text support for SIMD (#313)
ngzhian Aug 18, 2020
7ac3c74
Implement binary<->text support for SIMD lane operations (#314)
ngzhian Aug 18, 2020
d1c7783
Implement binary<->text support for SIMD conversion operations (#315)
ngzhian Aug 19, 2020
2d0868d
Implement binary<->text support for SIMD saturating ops and some shif…
ngzhian Aug 21, 2020
b81310b
Implement SIMD shr_u (#311)
ngzhian Aug 21, 2020
b89087d
Formatting fixes in shr_u (#318)
ngzhian Aug 24, 2020
e2e7006
Implement bitmask for SIMD (#319)
ngzhian Aug 25, 2020
91fe007
Add SIMD instructions to syntax (#271)
ngzhian Aug 25, 2020
e06fca2
Implement binary<->text for SIMD bitmask (#324)
ngzhian Aug 25, 2020
b7aea06
Fix to_hex_string for I8 and I16 (#320)
ngzhian Aug 25, 2020
6c852bb
Complete binary<->text for SIMD shifts (#325)
ngzhian Aug 26, 2020
9f36f3c
Merge remote-tracking branch 'upstream/master'
ngzhian Aug 26, 2020
d051fb6
Implement SIMD load splat and load extend
ngzhian Aug 8, 2020
e24bf43
Merge pull request #329 from ngzhian/master
ngzhian Aug 27, 2020
9303b60
Create new pack_simd type and SimdLoad AST
ngzhian Aug 27, 2020
c5d59f5
Reorder functions
ngzhian Aug 27, 2020
38045d7
Formatting
ngzhian Aug 27, 2020
0f07076
Simplify simd packed loads
ngzhian Aug 27, 2020
e8b2f1f
Add SimdStore and make simd_loadop more consistent
ngzhian Aug 28, 2020
403859f
Implement JS output for SIMD (#331)
ngzhian Aug 28, 2020
b295c5d
Implement SIMD load splat and load extend (#307)
ngzhian Aug 31, 2020
61085bd
Implement binary<->text support for SIMD load splats and extends
ngzhian Aug 26, 2020
ab14709
Merge pull request #334 from ngzhian/simd-loads-binary-encode
ngzhian Aug 31, 2020
bd0f5af
Fix SIMD bitmask (#335)
ngzhian Aug 31, 2020
7076939
Run SIMD tests (#326)
ngzhian Sep 1, 2020
71d4fa7
Specify binary format for SIMD (#333)
ngzhian Sep 1, 2020
13da962
Rename shuffle and swizzle to i8x16 prefix (#321)
ngzhian Sep 8, 2020
3e652c3
Rename SIMD load splats and load extends. (#322)
ngzhian Sep 8, 2020
163e122
Specify text format for SIMD (#336)
ngzhian Sep 8, 2020
e7c2002
Shorten saturating instructions to sat (#341)
ngzhian Sep 10, 2020
e1ff82e
Pseudo-Minimum and Pseudo-Maximum instructions (#122)
Maratyszcza Sep 11, 2020
8e87db7
Floating-point rounding instructions (#232)
Maratyszcza Sep 11, 2020
1167507
Define empty type (#345)
ngzhian Sep 17, 2020
9576fd0
Inline bytes expansion into text format (#347)
ngzhian Sep 17, 2020
da4f63b
Implement floating-point rounding in interpreter (#344)
ngzhian Sep 17, 2020
34a5da5
Create Blaneidx production, and encode lane index as u8 (#346)
ngzhian Sep 21, 2020
bbb88f2
Add pmin/pmax to NewOpcodes.md (#354)
ngzhian Sep 22, 2020
65d3504
Update implementation status (#355)
ngzhian Sep 22, 2020
e0fff32
Add SIMD pmin/pmax and floating point round instructions to syntax (#…
ngzhian Sep 22, 2020
f49eb17
Implement pmin/pmax in interpreter (#349)
ngzhian Sep 22, 2020
334a923
Add validation for SIMD instructions (#327)
ngzhian Sep 22, 2020
43825a2
Fix laneidx binary definition (#357)
ngzhian Sep 23, 2020
9579d43
Add V128 to validation algorithm and index of types (#359)
ngzhian Sep 23, 2020
09a621b
Merge remote-tracking branch 'upstream/master'
ngzhian Sep 24, 2020
b00d926
Merge pull request #362 from ngzhian/master
ngzhian Sep 28, 2020
d9e9d22
Clean up some SIMD TODOs (#367)
ngzhian Sep 29, 2020
1a08547
Add SIMD instructions to index of instructions (#366)
ngzhian Sep 29, 2020
8a7c145
Clarify out-of-range behaviour of i8x16.swizzle (#370)
Maratyszcza Oct 5, 2020
9c0aaec
Cleanup operators to remove duplicated V128Op (#358)
ngzhian Oct 6, 2020
1839dc1
Update README to require Ocaml 4.08 (#378)
ngzhian Oct 8, 2020
73bbae8
Move simd operations out into a new file (#377)
ngzhian Oct 8, 2020
8af851e
Tweak Firefox implementation status (#384)
lars-t-hansen Oct 15, 2020
a5eb71a
Remove unnecessary types for Bitmask (#385)
ngzhian Oct 19, 2020
b9b54b0
v128.load32_zero and v128.load64_zero instructions (#237)
Maratyszcza Oct 19, 2020
1cfd484
i32x4.dot_i16x8_s instruction (#127)
Maratyszcza Oct 19, 2020
2e2e494
Implement v128.load32_zero and v128.load64_zero (#388)
ngzhian Nov 2, 2020
2f4dc50
Fix encode, decode for load_zero (#391)
ngzhian Nov 2, 2020
4686958
Update V8 implementation status (#392)
ngzhian Nov 4, 2020
9d6d59d
Update SpiderMonkey implementation status
lars-t-hansen Nov 4, 2020
599b20d
Merge pull request #394 from WebAssembly/ff-impl-status-20201104
lars-t-hansen Nov 4, 2020
d154084
Implement i32x4.dot_i16x8_s (#393)
ngzhian Nov 4, 2020
8551a32
Update ChakraCore status (#399)
penzn Dec 2, 2020
890c043
Execution semantics (#340)
ngzhian Dec 8, 2020
c46c5cf
Small cleanup of simd exec/instructions (#401)
ngzhian Dec 11, 2020
20e914b
Extended multiplication instructions (#376)
Maratyszcza Dec 14, 2020
2fd21c0
Fix typo in SIMD.md (#409)
Dec 21, 2020
df999c8
i16x8.q15rmul_sat_s instruction (#365)
Maratyszcza Jan 11, 2021
364e89f
Merge from upstream spec (#407)
ngzhian Jan 11, 2021
dc1646a
i64x2.bitmask instruction (#368)
Maratyszcza Jan 11, 2021
daa35f5
i64x4.widen_(low/high)_i32x8_(s/u) instructions (#290)
Maratyszcza Jan 11, 2021
c0a5dde
Replace i8x16/i16x8/i32x4.any_true with v128.any_true (#423)
Maratyszcza Jan 12, 2021
32d700a
Load Lane and Store Lane instructions (#350)
Maratyszcza Jan 12, 2021
10d3153
Fix SIMD load splat/extend names in binary and text section of spec (…
ngzhian Jan 14, 2021
0813f85
Fix error in Q-format rounding multiplication (#424)
dtig Jan 14, 2021
723c967
Update v8 implementation status
ngzhian Jan 13, 2021
194b993
Rename i8x16.any_true to v128.any_true and remove other variants
ngzhian Jan 22, 2021
6ff10c8
Add i64x2.bitmask to text
ngzhian Jan 22, 2021
73c7608
Fix some typos
ngzhian Jan 22, 2021
dfffd0d
One more typo
ngzhian Jan 22, 2021
e6673a7
Check in generated instructions
ngzhian Jan 22, 2021
89f115d
[spectext] Rename i8x16.any_true to v128.any_true
ngzhian Jan 22, 2021
ffe1db3
Fix labels for SIMD instructions in gen-index-instructions.py
ngzhian Jan 26, 2021
0cd0a20
[interpreter] Implement load lane instructions (#428)
ngzhian Jan 29, 2021
c8c0de2
i64x2.eq instruction (#381)
Maratyszcza Jan 30, 2021
394330d
i64x2.ne instruction (#411)
Maratyszcza Jan 30, 2021
3d8c870
i64x2.all_true instructions (#415)
Maratyszcza Jan 30, 2021
dae9f6c
Double-precision conversion instructions (#383)
Maratyszcza Feb 1, 2021
f5c5dcc
Add v128 to JS API (#360)
ngzhian Feb 2, 2021
7266523
Merge remote-tracking branch 'upstream/master' into merge-upstream
ngzhian Feb 2, 2021
92ee194
Merge pull request #442 from ngzhian/merge-upstream
ngzhian Feb 2, 2021
40b255f
Run simd test cases with make partest (#434)
ngzhian Feb 3, 2021
b638fe3
[interpreter] Add i64x2.eq and i64x2.ne
ngzhian Feb 2, 2021
98915d5
Add semantics for v128.load32_zero v128.load64_zero
ngzhian Dec 17, 2020
7c37165
[interpreter] Implement SIMD extended multiply instructions (#438)
ngzhian Feb 3, 2021
b300c7a
[spectext] Add i64x2.all_true (#444)
ngzhian Feb 3, 2021
ef06db0
Implement i64x2.bitmask (#368)
ngzhian Jan 11, 2021
25f9d41
i8x16.popcnt instruction (#379)
Maratyszcza Feb 4, 2021
b6ca6b2
Extended pairwise addition instructions (#380)
Maratyszcza Feb 4, 2021
c69b8ef
i64x2.gt_s, i64x2.lt_s, i64x2.ge_s, and i64x2.le_s instructions (#412)
Maratyszcza Feb 5, 2021
961edc4
i64x2.abs instruction (#413)
Maratyszcza Feb 5, 2021
7a8190f
[spectext] Add i64x2 signed comparisons
ngzhian Feb 9, 2021
a2091ba
[spectext] Add ext mul instructions
ngzhian Feb 8, 2021
dd16427
[spectext] Add i8x16.popcnt to syntax
ngzhian Feb 5, 2021
0fe0ade
Skip _output directory when listing wast files for test. (#449)
ngzhian Feb 9, 2021
01fdbd3
Update simd_i64x2_cmp test output
ngzhian Feb 5, 2021
52fac1b
[spectext] Add i64x2.widen_{low,high}_i32x4_{s,u} to syntax
ngzhian Feb 4, 2021
34e195c
[spectext] Load lane and store lane validation and semantics (#445)
ngzhian Feb 9, 2021
634be58
[interpreter] Implement i64x2.widen_{low,high}_i32x4_{s,u}
ngzhian Feb 4, 2021
ef343cb
[interpreter] Implement i8x16.popcnt (#451)
ngzhian Feb 9, 2021
17f55c3
[interpreter] Add i64x2 signed comparisons (#454)
ngzhian Feb 9, 2021
fe63095
[interpreter] Implement i64x2.abs
ngzhian Feb 10, 2021
c300b8a
[spec-text] Add i64x2 widen instructions to text and binary
ngzhian Feb 10, 2021
14436c0
[spectext] Add i8x16.popcnt to text and binary format
ngzhian Feb 10, 2021
ab6a361
[spec-text] Add i64x2.abs
ngzhian Feb 9, 2021
6dcabf6
[spectext] Add i64x2 comparisons to text and binary format
ngzhian Feb 9, 2021
ebe26fe
[spectext] Add extmul instructions to text/binary formats
ngzhian Feb 10, 2021
7c43e09
[interpreter] Implement store lane instructions (#435)
ngzhian Feb 11, 2021
2d191fe
[spectext] Add i16x8.qmulr_sat_s
ngzhian Feb 11, 2021
2eb77e2
[interpreter] Implement i16x8.qmulr_sat_s (#463)
ngzhian Feb 17, 2021
bf505da
[interpreter] Implement i32x4.trunc_sat_f64x2_{s,u}_zero (#466)
ngzhian Feb 17, 2021
4c8378f
[spectext] Add load/store lane text and binary format
ngzhian Feb 10, 2021
77b3177
[spectext] Add {f32x4,f64x2}.{pmin,pmax}
ngzhian Sep 22, 2020
4c442ce
[interpreter] Add i64x2.all_true
ngzhian Feb 12, 2021
31efb15
[interpreter] Add a missing closing parens
ngzhian Feb 17, 2021
b2e0c76
[interpreter] f64x2.promote_low_f32x4 and f32x4.demote_f64x2_zero
ngzhian Feb 12, 2021
2c28fa8
Final opcodes (#452)
tlively Feb 19, 2021
958c09b
Add links to Emscripten docs to README (#479)
tlively Feb 19, 2021
64b8775
[spectext] Rename integer widen instructions to integer extend
ngzhian Feb 19, 2021
a64adb9
[interpreter] Implement f64x2.convert_low_i32x4_{s,u}
ngzhian Feb 17, 2021
a041470
[interpreter] Implement extadd pairwise instructions
ngzhian Feb 18, 2021
7c0ca01
[spectext] Add i32x4.dot_i16x8_s (#475)
ngzhian Feb 24, 2021
33ba45f
[spectext] Add extended pairwise add instructions (#476)
ngzhian Feb 24, 2021
bc618a3
[interpreter] Rename integer widen instructions to integer extend
ngzhian Feb 19, 2021
cd63ede
[spectext] Add double precision conversion
ngzhian Feb 12, 2021
f6671c1
Check in simd_i64x2_arith2.wast test file
ngzhian Feb 24, 2021
b4fde03
Fix i32x4.trunc_sat_f64x2_zero
ngzhian Feb 24, 2021
770ce64
Fix q15 saturating mul
ngzhian Feb 24, 2021
e5ce801
Update interpreter and text with finalized opcodes
ngzhian Feb 26, 2021
5c9aeed
Fix a typo in the f64x2.{pmin,pmax} binary spec
alexcrichton Mar 5, 2021
466ca5a
Fix instructions in gen-index-instructions
ngzhian Mar 5, 2021
6b8204b
Check in fixed generated index-instructions.rst
ngzhian Mar 10, 2021
22bd78d
Comparison instructions should return -1 in lanes (#493)
ngzhian Mar 11, 2021
2c59b1d
Fix usages of \extend in SIMD instructions (#494)
ngzhian Mar 11, 2021
1faf045
Merge remote-tracking branch 'upstream/master' into merging-upstream
ngzhian Mar 12, 2021
510b652
Fix SIMD implementation get tests passing
ngzhian Mar 12, 2021
9da8a61
Fix typo in js-api/index.b
ngzhian Mar 12, 2021
acd913d
Merge pull request #495 from ngzhian/merging-upstream
ngzhian Mar 15, 2021
886123e
Small cleanup to num_pat to remove redundant Source.phrase
ngzhian Mar 18, 2021
01b4127
Update SpiderMonkey implementation status
Mar 23, 2021
bdcc304
Merge pull request #499 from lars-t-hansen/spidermonkey_conformance
lars-t-hansen Mar 23, 2021
a65385e
Convert simd instructions in index to use hex
ngzhian Mar 24, 2021
5580da2
Improve simd_i64x2_cmp.wast
abrown Mar 26, 2021
1618b39
Merge pull request #501 from abrown/fix-487
ngzhian Mar 29, 2021
c972ba6
Merge pull request #500 from ngzhian/simd-index-instr
ngzhian Apr 6, 2021
291d2ec
Merge pull request #497 from ngzhian/script-pat-cleanup
ngzhian Apr 7, 2021
5fcd0bd
Update V8 implementation status
ngzhian Apr 22, 2021
de4409b
Merge pull request #503 from ngzhian/update-v8-impl-status
ngzhian Apr 26, 2021
05d0cb6
Merge remote-tracking branch 'upstream/master'
ngzhian May 12, 2021
3c70759
Merge pull request #504 from ngzhian/main
ngzhian May 13, 2021
a7404ca
Update Firefox implementation status
lars-t-hansen May 27, 2021
c4e4b96
Merge pull request #505 from WebAssembly/lars-t-hansen-patch-1
ngzhian May 27, 2021
b0720df
Add simple JS api test for SIMD (#496)
ngzhian Jun 15, 2021
d532655
Refactor interpreter
rossberg Jul 28, 2021
ca8ea9a
Refactor simd pack
rossberg Jul 31, 2021
576bcab
Tweaks
rossberg Aug 2, 2021
89e4f59
Separate v128 from lane ops
rossberg Aug 2, 2021
a373625
Simplify printing
rossberg Aug 2, 2021
6ffe701
Todos
rossberg Aug 2, 2021
cc888ba
Merge pull request #510 from WebAssembly/refactor
rossberg Aug 2, 2021
08a82f9
Rename Eval_numeric to Eval_num; remove Numeric_error
rossberg Aug 3, 2021
da4e926
Inline Simd functor; simplifications
rossberg Aug 3, 2021
eb515ca
Rename Int/Float to Ixx/Fxx
rossberg Aug 3, 2021
2387754
Rename internal modules as well
rossberg Aug 3, 2021
4345d4f
Merge pull request #512 from WebAssembly/ixx
rossberg Aug 3, 2021
04ce4a3
Merge pull request #511 from WebAssembly/refactor.v128
rossberg Aug 3, 2021
e68f37a
Simd -> Vec
rossberg Aug 5, 2021
17c4983
Update README
rossberg Aug 5, 2021
b61ed92
Merge pull request #513 from WebAssembly/vec
rossberg Aug 5, 2021
f6c9635
Bring spec and interpreter closer together
rossberg Aug 5, 2021
b3f039b
Rename \vs-ops
rossberg Aug 11, 2021
47f7b93
Eps
rossberg Aug 11, 2021
d1dc52c
Merge cvtop reduction
rossberg Aug 11, 2021
9382cc2
Rename simd->vec types in spec
rossberg Aug 11, 2021
e2e5b96
Review comments
rossberg Aug 12, 2021
7794d59
Merge branch 'refactor.spec' into vec.spec
rossberg Aug 12, 2021
08aeb77
Review comments
rossberg Aug 12, 2021
6d7e83d
More comments
rossberg Aug 12, 2021
02cf939
Update BinarySIMD.md (#518)
ngzhian Aug 17, 2021
a288cc7
Merge pull request #516 from WebAssembly/vec.spec
rossberg Sep 8, 2021
b9fbe20
Merge pull request #515 from WebAssembly/refactor.spec
rossberg Sep 8, 2021
80c0603
Merge from upstream spec
ngzhian Sep 17, 2021
a19f219
Name memarg arguments
ngzhian Sep 17, 2021
dec105e
Merge pull request #519 from ngzhian/sync-upstream
ngzhian Sep 18, 2021
32a461f
Merge pull request #520 from ngzhian/fix-memarg
ngzhian Sep 29, 2021
a3e4b05
Add Changelog (#522)
rossberg Oct 4, 2021
5ef6f0d
Merge remote-tracking branch 'upstream/main' into merge-upstream
ngzhian Oct 21, 2021
c1802b6
Merge pull request #525 from ngzhian/merge-upstream
ngzhian Oct 21, 2021
e86f7ab
Merge remote-tracking branch 'upstream/main' into merge-upstream
ngzhian Nov 4, 2021
73af50a
Merge pull request #526 from ngzhian/merge-upstream
ngzhian Nov 4, 2021
eda5421
Fix some stale references to value types (#527)
ngzhian Nov 11, 2021
7ce9b41
Make i8 and i16 work correctly on their own (#528)
ngzhian Nov 15, 2021
9468abb
Merge remote-tracking branch 'upstream/main' into merge-upstream
ngzhian Nov 16, 2021
4c2d74d
Merge pull request #529 from ngzhian/merge-upstream
ngzhian Nov 16, 2021
a78b98a
Remove long unnecessary comment (#530)
ngzhian Nov 16, 2021
dbb6289
Remove simd meeting notes
ngzhian Nov 16, 2021
dc05aa1
Change README back to spec README
ngzhian Nov 16, 2021
c442ee0
Merge remote-tracking branch 'origin/main' into merge-simd
ngzhian Nov 18, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions document/core/appendix/algorithm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Types are representable as an enumeration.

.. code-block:: pseudo

type val_type = I32 | I64 | F32 | F64 | Funcref | Externref
type val_type = I32 | I64 | F32 | F64 | V128 | Funcref | Externref

func is_num(t : val_type | Unknown) : bool =
return t = I32 || t = I64 || t = F32 || t = F64 || t = Unknown
return t = I32 || t = I64 || t = F32 || t = F64 || t = V128 || t = Unknown

func is_ref(t : val_type | Unknown) : bool =
return t = Funcref || t = Externref || t = Unknown
Expand Down
37 changes: 37 additions & 0 deletions document/core/appendix/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,40 @@ Added instructions that modify ranges of memory or table entries [#proposal-reft
* Active data and element segments boundaries are no longer checked at compile time but may trap instead


.. index:: instructions, SIMD, value type, vector type

Vector instructions
...................

Added vector type and instructions that manipulate multiple numeric values in parallel (also known as *SIMD*, single instruction multiple data) [#proposal-vectype]_

* New :ref:`value type <syntax-valtype>`: |V128|

* New :ref:`memory instructions <syntax-instr-memory>`: :math:`\K{v128.}\LOAD`, :math:`\K{v128.}\LOAD{}\!N\!\K{x}\!M\!\K{\_}\sx`, :math:`\K{v128.}\LOAD{}N\K{\_zero}`, :math:`\K{v128.}\LOAD{}N\K{\_splat}`, :math:`\K{v128.}\LOAD{}N\K{\_lane}`, :math:`\K{v128.}\STORE`, :math:`\K{v128.}\STORE{}N\K{\_lane}`

* New constant :ref:`vector instruction <syntax-instr-vec>`: :math:`\K{v128.}\VCONST`

* New unary :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{v128.not}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.abs}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.neg}`, :math:`\K{i8x16.popcnt}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.abs}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.neg}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.sqrt}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.ceil}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.floor}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.trunc}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.nearest}`

* New binary :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{v128.and}`, :math:`\K{v128.andnot}`, :math:`\K{v128.or}`, :math:`\K{v128.xor}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.add}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.sub}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.mul}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.add\_sat\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.sub\_sat\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.min\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.max\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.shl}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.shr\_}\sx`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.add}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.extmul\_}\half\K{\_i}\!N'\!\K{x}\!M'\!\K{\_}\sx`, :math:`\K{i16x8.q15mulr\_sat\_s}`, :math:`\K{i32x4.dot\_i16x8\_s}`, :math:`\K{i16x8.extadd\_pairwise\_i8x16\_}\sx`, :math:`\K{i32x4.extadd\_pairwise\_i16x8\_}\sx`, :math:`\K{i8x16.avgr\_u}`, :math:`\K{i16x8.avgr\_u}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.sub}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.mul}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.div}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.min}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.max}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.pmin}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.pmax}`

* New ternary :ref:`vector instruction <syntax-instr-vec>`: :math:`\K{v128.bitselect}`

* New test :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{v128.any\_true}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.all\_true}`

* New relational :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{i}\!N\!\K{x}\!M\!\K{.eq}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.ne}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.lt\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.gt\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.le\_}\sx`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.ge\_}\sx`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.eq}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.ne}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.lt}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.gt}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.le}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.ge}`

* New conversion :ref:`vector instructions <syntax-instr-vec>`::math:`\K{i32x4.trunc\_sat\_f32x4\_}\sx`, :math:`\K{i32x4.trunc\_sat\_f64x2\_}\sx\K{\_zero}`, :math:`\K{f32x4.convert\_i32x4\_}\sx`, :math:`\K{f32x4.demote\_f64x2\_zero}`, :math:`\K{f64x2.convert\_low\_i32x4\_}\sx`, :math:`\K{f64x2.promote\_low\_f32x4}`

* New lane access :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{i}\!N\!\K{x}\!M\!\K{.extract\_lane\_}\sx^?`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.replace\_lane}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.extract\_lane}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.replace\_lane}`

* New lane splitting/combining :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{i}\!N\!\K{x}\!M\!\K{.extend\_}\half\K{\_i}\!N'\!\K{x}\!M'\!\K{\_}\sx`, :math:`\K{i8x16.narrow\_i16x8\_}\sx`, :math:`\K{i16x8.narrow\_i32x4\_}\sx`

* New byte reordering :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{i8x16.shuffle}`, :math:`\K{i8x16.swizzle}`

* New injection/projection :ref:`vector instructions <syntax-instr-vec>`: :math:`\K{i}\!N\!\K{x}\!M\!\K{.splat}`, :math:`\K{f}\!N\!\K{x}\!M\!\K{.splat}`, :math:`\K{i}\!N\!\K{x}\!M\!\K{.bitmask}`


.. [#proposal-signext]
https://github.com/WebAssembly/spec/tree/main/proposals/sign-extension-ops/

Expand All @@ -118,3 +152,6 @@ Added instructions that modify ranges of memory or table entries [#proposal-reft

.. [#proposal-bulk]
https://github.com/WebAssembly/spec/tree/main/proposals/bulk-memory-operations/

.. [#proposal-vectype]
https://github.com/WebAssembly/spec/tree/main/proposals/simd/
Loading