This repository was archived by the owner on Dec 22, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -189,3 +189,5 @@ The `v8x16.shuffle` instruction has 16 bytes after `simdop`.
189
189
| ` i64x2.load32x2_s ` | ` 0xd6 ` | m: memarg |
190
190
| ` i64x2.load32x2_u ` | ` 0xd7 ` | m: memarg |
191
191
| ` v128.andnot ` | ` 0xd8 ` | - |
192
+ | ` i8x16.avgr_u ` | ` 0xd9 ` | |
193
+ | ` i16x8.avgr_u ` | ` 0xda ` | |
Original file line number Diff line number Diff line change 87
87
| ` i8x16.sub ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
88
88
| ` i8x16.sub_saturate_s ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
89
89
| ` i8x16.sub_saturate_u ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
90
+ | ` i8x16.avgr_u ` | | | | |
90
91
| ` i16x8.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
91
92
| ` i16x8.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
92
93
| ` i16x8.all_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
100
101
| ` i16x8.sub_saturate_s ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
101
102
| ` i16x8.sub_saturate_u ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
102
103
| ` i16x8.mul ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
104
+ | ` i16x8.avgr_u ` | | | | |
103
105
| ` i32x4.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
104
106
| ` i32x4.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
105
107
| ` i32x4.all_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
Original file line number Diff line number Diff line change @@ -457,6 +457,20 @@ def S.sub_saturate_u(a, b):
457
457
return S.lanewise_binary(subsat, S.AsUnsigned(a), S.AsUnsigned(b))
458
458
```
459
459
460
+ ### Integer rounding average
461
+ * ` i8x16.avgr_u(a: v128, b: v128) -> v128 `
462
+ * ` i16x8.avgr_u(a: v128, b: v128) -> v128 `
463
+
464
+ Lane-wise rounding average:
465
+
466
+ ``` python
467
+ def S.RoundingAverage(x, y):
468
+ return (x + y + 1 ) // 2
469
+
470
+ def S.avgr_u(a, b):
471
+ return S.lanewise_binary(S.RoundingAverage, S.AsUnsigned(a), S.AsUnsigned(b))
472
+ ```
473
+
460
474
## Bit shifts
461
475
462
476
### Left shift by scalar
You can’t perform that action at this time.
0 commit comments