This repository was archived by the owner on Dec 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,3 +202,7 @@ The `v8x16.shuffle` instruction has 16 bytes after `simdop`.
202202| ` i8x16.abs ` | ` 0xe1 ` | - |
203203| ` i16x8.abs ` | ` 0xe2 ` | - |
204204| ` i32x4.abs ` | ` 0xe3 ` | - |
205+ | ` v8x16.signselect ` | ` 0xe4 ` | - |
206+ | ` v16x8.signselect ` | ` 0xe5 ` | - |
207+ | ` v32x4.signselect ` | ` 0xe6 ` | - |
208+ | ` v64x2.signselect ` | ` 0xe7 ` | - |
Original file line number Diff line number Diff line change 7575| ` v128.or ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
7676| ` v128.xor ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
7777| ` v128.bitselect ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
78+ | ` v8x16.signselect ` | | | | |
79+ | ` v16x8.signselect ` | | | | |
80+ | ` v32x4.signselect ` | | | | |
81+ | ` v64x2.signselect ` | | | | |
7882| ` i8x16.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
7983| ` i8x16.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
8084| ` i8x16.all_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
Original file line number Diff line number Diff line change @@ -612,6 +612,17 @@ Note that the normal WebAssembly `select` instruction also works with vector
612612types. It selects between two whole vectors controlled by a single scalar value,
613613rather than selecting bits controlled by a control mask vector.
614614
615+ ### Sign select
616+ * ` v8x16.signselect(v1: v128, v2: v128, c: v128) -> v128 `
617+ * ` v16x8.signselect(v1: v128, v2: v128, c: v128) -> v128 `
618+ * ` v32x4.signselect(v1: v128, v2: v128, c: v128) -> v128 `
619+ * ` v64x2.signselect(v1: v128, v2: v128, c: v128) -> v128 `
620+
621+ Use the sign bits in the control mask ` c ` to select the corresponding element
622+ from ` v1 ` when 1 (negative sign) and ` v2 ` when 0 (positive sign).
623+
624+ Note that these instructions work for both signed integer and floating-point
625+ control masks.
615626
616627## Boolean horizontal reductions
617628
You can’t perform that action at this time.
0 commit comments