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

Commit c165542

Browse files
committed
i16x8.q15rmul_sat_s instruction
1 parent 20e914b commit c165542

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

proposals/simd/BinarySIMD.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ 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`| - |
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: | :heavy_check_mark: |
135136
| `i32x4.any_true` | `-msimd128` | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: |

proposals/simd/NewOpcodes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
| i8x16.max_u | 0x79 | i16x8.max_u | 0x99 | i32x4.max_u | 0xb9 | ---- | 0xd9 |
109109
| ---------------- | 0x7a | ---------------- | 0x9a | i32x4.dot_i16x8_s | 0xba | ---- | 0xda |
110110
| i8x16.avgr_u | 0x7b | i16x8.avgr_u | 0x9b | ---- avgr_u ---- | 0xbb | ---- | 0xdb |
111+
| ---- | 0x7c | i16x8.q15mulr_sat_s | 0x9c | ---- | 0xbc | ---- | 0xdc |
111112

112113
| f32x4 Op | opcode | f64x2 Op | opcode |
113114
| --------------- | ------ | --------------- | ------ |

proposals/simd/SIMD.md

Lines changed: 13 additions & 0 deletions
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)