From 4bd25840c3ea2fc726e195033ef617e70c511068 Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Mar 2021 21:39:14 +0200 Subject: [PATCH 1/2] Update SIMD instructions --- src/environment.md | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/environment.md b/src/environment.md index cdec61c6e..3d9c743fc 100644 --- a/src/environment.md +++ b/src/environment.md @@ -482,12 +482,12 @@ Likewise, these represent the [WebAssembly SIMD](https://github.com/WebAssembly/ Negates each lane. * ```ts - function v128.add_saturate(a: v128, b: v128): v128 + function v128.add_sat(a: v128, b: v128): v128 ``` Adds each signed small integer lane using saturation. * ```ts - function v128.sub_saturate(a: v128, b: v128): v128 + function v128.sub_sat(a: v128, b: v128): v128 ``` Subtracts each signed small integer lane using saturation. @@ -556,6 +556,16 @@ Likewise, these represent the [WebAssembly SIMD](https://github.com/WebAssembly/ ``` Computes the minimum of each lane. +* ```ts + function v128.pmax(a: v128, b: v128): v128 + ``` + Computes the pseudo-maximum of each lane. + +* ```ts + function v128.pmin(a: v128, b: v128): v128 + ``` + Computes the psuedo-minimum of each lane. + * ```ts function v128.dot(a: v128, b: v128): v128 ``` @@ -642,24 +652,14 @@ Likewise, these represent the [WebAssembly SIMD](https://github.com/WebAssembly/ Narrows wider integer lanes to their respective narrower lanes. * ```ts - function v128.widen_low(a: v128): v128 + function v128.extend_low(a: v128): v128 ``` - Widens the low half of narrower integer lanes to their respective wider lanes. + Extends the low half of narrower integer lanes to their respective wider lanes. * ```ts - function v128.widen_high(a: v128): v128 + function v128.extend_high(a: v128): v128 ``` - Widens the high half of narrower integer lanes to their respective wider lanes. - -* ```ts - function v128.qfma(a: v128, b: v128, c: v128): v128 - ``` - Computes `(a * b) + c` for each floating point lane. - -* ```ts - function v128.qfms(a: v128, b: v128, c: v128): v128 - ``` - Computes `(a * b) - c` for each floating point lane. + Extends the high half of narrower integer lanes to their respective wider lanes. In addition, the namespaces `i8x16`, `i16x8`, `i32x4`, `i64x2` , `f32x4` and `f64x2` provide their respective non-generic instructions, like `i32x4.splat` etc. Each of them can also be used to create a literal directly: @@ -692,5 +692,3 @@ In addition, the namespaces `i8x16`, `i16x8`, `i32x4`, `i64x2` , `f32x4` and `f6 function f64x2(a: f64, b: f64): v128 ``` Initializes a 128-bit vector from two 64-bit float values. Arguments must be compile-time constants. - -The namespaces `v8x16`, `v16x8`, `v32x4` and `v64x2` provide the respective sign agnostic instructions according to text format. From 0710aad3e75267953c129129e3d93aeaf161a14b Mon Sep 17 00:00:00 2001 From: dcode Date: Tue, 30 Mar 2021 21:42:37 +0200 Subject: [PATCH 2/2] any_true is not generic anymore --- src/environment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environment.md b/src/environment.md index 3d9c743fc..8b9138065 100644 --- a/src/environment.md +++ b/src/environment.md @@ -532,7 +532,7 @@ Likewise, these represent the [WebAssembly SIMD](https://github.com/WebAssembly/ Selects bits of either vector according to the specified mask. * ```ts - function v128.any_true(a: v128): bool + function v128.any_true(a: v128): bool ``` Reduces a vector to a scalar indicating whether any lane is considered `true`.