Skip to content

Editorial review: Document remaining Wasm SIMD instructions#43800

Merged
chrisdavidmills merged 18 commits intomdn:mainfrom
chrisdavidmills:wasm-simd-4
Apr 21, 2026
Merged

Editorial review: Document remaining Wasm SIMD instructions#43800
chrisdavidmills merged 18 commits intomdn:mainfrom
chrisdavidmills:wasm-simd-4

Conversation

@chrisdavidmills
Copy link
Copy Markdown
Contributor

Description

This PR (hopefully!) documents all of the remaining Wasm SIMD instructions that were not covered in other PRs.

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills chrisdavidmills requested a review from a team as a code owner April 15, 2026 16:43
@chrisdavidmills chrisdavidmills requested review from hamishwillee and removed request for a team April 15, 2026 16:43
@github-actions github-actions Bot added the Content:wasm WebAssembly docs label Apr 15, 2026
@chrisdavidmills chrisdavidmills marked this pull request as draft April 15, 2026 16:44
@github-actions github-actions Bot added the size/l [PR only] 501-1000 LoC changed label Apr 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 15, 2026

Preview URLs (72 pages)
External URLs (12)

URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic
Title: WebAssembly SIMD-specific arithmetic instructions


URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic/add_sat_s
Title: add_sat_s: Wasm SIMD arithmetic instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic/add_sat_u
Title: add_sat_u: Wasm SIMD arithmetic instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic/dot_i16x8_s
Title: dot_i16x8_s: Wasm SIMD arithmetic instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic/q15mulr_sat_s
Title: q15mulr_sat_s: Wasm SIMD arithmetic instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic/sub_sat_s
Title: sub_sat_s: Wasm SIMD arithmetic instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/arithmetic/sub_sat_u
Title: sub_sat_u: Wasm SIMD arithmetic instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/conversion
Title: WebAssembly SIMD conversion instructions


URL: /en-US/docs/WebAssembly/Reference/SIMD/conversion/trunc_sat_f32x4_s
Title: trunc_sat_f32x4_s: Wasm SIMD conversion instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/conversion/trunc_sat_f32x4_u
Title: trunc_sat_f32x4_u: Wasm SIMD conversion instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/conversion/trunc_sat_f64x2_s_zero
Title: trunc_sat_f64x2_s_zero: Wasm SIMD conversion instruction


URL: /en-US/docs/WebAssembly/Reference/SIMD/conversion/trunc_sat_f64x2_u_zero
Title: trunc_sat_f64x2_u_zero: Wasm SIMD conversion instruction

(comment last updated: 2026-04-21 07:09:03)

@github-actions github-actions Bot added size/xl [PR only] >1000 LoC changed and removed size/l [PR only] 501-1000 LoC changed labels Apr 16, 2026
sidebar: webassemblysidebar
---

The **`add_sat_s`** [SIMD arithmetic instruction](/en-US/docs/WebAssembly/Reference/SIMD/arithmetic) performs a saturated addition of two signed [`v128`](/en-US/docs/WebAssembly/Reference/Types/v128) value interpretations. Each lane of the output value is the result of adding the corresponding lanes of the input value.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not reviewing yet of course, but saw this term "saturated addition". I know this is probably known by the intended audience but I have never heard of this, and think it reasonable to be a wikipedia link

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit note, if "Each lane of the output value is the result of adding the corresponding lanes of the input value." is all this means, I still wonder what "saturated" means. Probably not a wikipedia link if you can explain it here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I've both linked to the relevant Wikipedia entry on the relevant pages and explained what the output values are clamped to due to the saturation.

@chrisdavidmills chrisdavidmills marked this pull request as ready for review April 17, 2026 09:55
@chrisdavidmills chrisdavidmills requested a review from a team as a code owner April 17, 2026 09:55
@chrisdavidmills chrisdavidmills requested review from dipikabh and removed request for a team April 17, 2026 09:55
@chrisdavidmills chrisdavidmills changed the title Document remaining Wasm SIMD instructions Editorial review: Document remaining Wasm SIMD instructions Apr 17, 2026
@chrisdavidmills
Copy link
Copy Markdown
Contributor Author

The tech review PR is merged (thanks, @eqrion!)

Over to you, @hamishwillee. Let me know if you can spot anything else that needs urgent attention before we get it merged.

Comment thread files/en-us/webassembly/reference/simd/arithmetic/add_sat_s/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/arithmetic/avgr_u/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/arithmetic/dot_i16x8_s/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/arithmetic/dot_i16x8_s/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/arithmetic/extmul_high_i16x8_u/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/arithmetic/q15mulr_sat_s/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/arithmetic/q15mulr_sat_s/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/conversion/narrow_i32x4_u/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/conversion/trunc_sat_f32x4_u/index.md Outdated
Comment thread files/en-us/webassembly/reference/simd/load_store/store/index.md
Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. I have scanned this and tried to look at each type of function, but not necessarily each function in detail. Patterns are common, so if you take the suggestions in one you can roll them out to the similar methods.

Comment thread files/en-us/webassembly/reference/simd/conversion/trunc_sat_f32x4_s/index.md Outdated
Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrisdavidmills Looks good. Just one comment to address https://github.com/mdn/content/pull/43800/changes/05cc6057b0b63a6b93052b648b8a17187cbecd5e..4de01b5317d01d470d6ef2ccf998ed0254ac6605#r3114060720

I'm approving so I don't block you after you have looked at that.

@chrisdavidmills chrisdavidmills removed the request for review from dipikabh April 21, 2026 07:07
@chrisdavidmills chrisdavidmills merged commit 76b3f42 into mdn:main Apr 21, 2026
9 checks passed
@chrisdavidmills chrisdavidmills deleted the wasm-simd-4 branch April 21, 2026 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:wasm WebAssembly docs size/xl [PR only] >1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants