Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit 77d4b53

Browse files
committed
i16x8.q15rmul_sat_s instruction
1 parent 9579d43 commit 77d4b53

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

proposals/simd/BinarySIMD.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
162162
| `i16x8.max_s` | `0x98`| - |
163163
| `i16x8.max_u` | `0x99`| - |
164164
| `i16x8.avgr_u` | `0x9b`| |
165+
| `i16x8.q15mulr_sat_s` | `0x9c`| - |
165166
| `i32x4.abs` | `0xa0`| - |
166167
| `i32x4.neg` | `0xa1`| - |
167168
| `i32x4.any_true` | `0xa2`| - |

proposals/simd/ImplementationStatus.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
| `i16x8.max_s` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
131131
| `i16x8.max_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
132132
| `i16x8.avgr_u` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
133+
| `i16x8.q15mulr_sat_s` | | | | | |
133134
| `i32x4.abs` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
134135
| `i32x4.neg` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |
135136
| `i32x4.any_true` | `-msimd128` | :heavy_check_mark: | | | :heavy_check_mark: |

proposals/simd/NewOpcodes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
| i8x16.max_u | 0x79 | i16x8.max_u | 0x99 | i32x4.max_u | 0xb9 | ---- | 0xd9 |
107107
| ---- avgr_s ---- | 0x7a | ---- avgr_s ---- | 0x9a | ---- avgr_s ---- | 0xba | ---- | 0xda |
108108
| i8x16.avgr_u | 0x7b | i16x8.avgr_u | 0x9b | ---- avgr_u ---- | 0xbb | ---- | 0xdb |
109+
| ---- | 0x7c | i16x8.q15mulr_sat_s | 0x9c | ---- | 0xbc | ---- | 0xdc |
109110

110111
| f32x4 Op | opcode | f64x2 Op | opcode |
111112
| --------------- | ------ | --------------- | ------ |

proposals/simd/SIMD.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,19 @@ def S.sub_sat_u(a, b):
472472
return S.lanewise_binary(subsat, S.AsUnsigned(a), S.AsUnsigned(b))
473473
```
474474

475+
### Saturating integer Q-format rounding multiplication
476+
477+
* `i16x8.q15mulr_sat_s(a: v128, b: v128) -> v128`
478+
479+
Lane-wise saturating rounding multiplication in Q15 format:
480+
481+
```python
482+
def S.q15mulr_sat_s(a, b):
483+
def subq15mulr(x, y):
484+
return S.SignedSaturate((x * y + 0x4000) >> 15)
485+
return S.lanewise_binary(subsat, S.AsSigned(a), S.AsSigned(b))
486+
```
487+
475488
### Lane-wise integer minimum
476489
* `i8x16.min_s(a: v128, b: v128) -> v128`
477490
* `i8x16.min_u(a: v128, b: v128) -> v128`

0 commit comments

Comments
 (0)