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`.
189189| ` i64x2.load32x2_s ` | ` 0xd6 ` | m: memarg |
190190| ` i64x2.load32x2_u ` | ` 0xd7 ` | m: memarg |
191191| ` v128.andnot ` | ` 0xd8 ` | - |
192+ | ` i8x16.avgr_u ` | ` 0xd9 ` | |
193+ | ` i16x8.avgr_u ` | ` 0xda ` | |
Original file line number Diff line number Diff line change 8787| ` i8x16.sub ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
8888| ` i8x16.sub_saturate_s ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
8989| ` i8x16.sub_saturate_u ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
90+ | ` i8x16.avgr_u ` | | | | |
9091| ` i16x8.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
9192| ` i16x8.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
9293| ` i16x8.all_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
100101| ` i16x8.sub_saturate_s ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
101102| ` i16x8.sub_saturate_u ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
102103| ` i16x8.mul ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
104+ | ` i16x8.avgr_u ` | | | | |
103105| ` i32x4.neg ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
104106| ` i32x4.any_true ` | ` -msimd128 ` | :heavy_check_mark : | :heavy_check_mark : | :heavy_check_mark : |
105107| ` 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):
457457 return S.lanewise_binary(subsat, S.AsUnsigned(a), S.AsUnsigned(b))
458458```
459459
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+
460474## Bit shifts
461475
462476### Left shift by scalar
You can’t perform that action at this time.
0 commit comments