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

Commit 310141c

Browse files
authored
Merge pull request #104 from ngzhian/shift-clarify
Clarify that shift count is modulo lane width
2 parents 33e58aa + 52ec9ca commit 310141c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proposals/simd/SIMD.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ def S.sub_saturate_u(a, b):
465465
* `i32x4.shl(a: v128, y: i32) -> v128`
466466
* `i64x2.shl(a: v128, y: i32) -> v128`
467467

468-
Shift the bits in each lane to the left by the same amount. Only the low bits
469-
of the shift amount are used:
468+
Shift the bits in each lane to the left by the same amount. The shift count is
469+
taken modulo lane width:
470470

471471
```python
472472
def S.shl(a, y):
@@ -487,9 +487,9 @@ def S.shl(a, y):
487487
* `i64x2.shr_s(a: v128, y: i32) -> v128`
488488
* `i64x2.shr_u(a: v128, y: i32) -> v128`
489489

490-
Shift the bits in each lane to the right by the same amount. This is an
491-
arithmetic right shift for the `_s` variants and a logical right shift for the
492-
`_u` variants.
490+
Shift the bits in each lane to the right by the same amount. The shift count is
491+
taken modulo lane width. This is an arithmetic right shift for the `_s`
492+
variants and a logical right shift for the `_u` variants.
493493

494494
```python
495495
def S.shr_s(a, y):

0 commit comments

Comments
 (0)