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

Commit df999c8

Browse files
authored
i16x8.q15rmul_sat_s instruction (#365)
Merging with TBD opcodes.
1 parent 2fd21c0 commit df999c8

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

proposals/simd/BinarySIMD.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
161161
| `i16x8.min_u` | `0x97`| - |
162162
| `i16x8.max_s` | `0x98`| - |
163163
| `i16x8.max_u` | `0x99`| - |
164-
| `i16x8.avgr_u` | `0x9b`| |
164+
| `i16x8.avgr_u` | `0x9b`| - |
165165
| `i32x4.abs` | `0xa0`| - |
166166
| `i32x4.neg` | `0xa1`| - |
167167
| `i32x4.any_true` | `0xa2`| - |
@@ -237,3 +237,4 @@ For example, `ImmLaneIdx16` is a byte with values in the range 0-15 (inclusive).
237237
| `i64x2.extmul_high_i32x4_s` | `0x119`| - |
238238
| `i64x2.extmul_low_i32x4_u` | `0x11a`| - |
239239
| `i64x2.extmul_high_i32x4_u` | `0x11b`| - |
240+
| `i16x8.q15mulr_sat_s` | `TBD`| - |

proposals/simd/ImplementationStatus.md

+1
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: | :heavy_check_mark: |
135136
| `i32x4.any_true` | `-msimd128` | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |

proposals/simd/SIMD.md

+13
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,19 @@ def S.sub_sat_u(a, b):
509509
return S.lanewise_binary(subsat, S.AsUnsigned(a), S.AsUnsigned(b))
510510
```
511511

512+
### Saturating integer Q-format rounding multiplication
513+
514+
* `i16x8.q15mulr_sat_s(a: v128, b: v128) -> v128`
515+
516+
Lane-wise saturating rounding multiplication in Q15 format:
517+
518+
```python
519+
def S.q15mulr_sat_s(a, b):
520+
def subq15mulr(x, y):
521+
return S.SignedSaturate((x * y + 0x4000) >> 15)
522+
return S.lanewise_binary(subsat, S.AsSigned(a), S.AsSigned(b))
523+
```
524+
512525
### Lane-wise integer minimum
513526
* `i8x16.min_s(a: v128, b: v128) -> v128`
514527
* `i8x16.min_u(a: v128, b: v128) -> v128`

0 commit comments

Comments
 (0)