avanhatt opened PR #6186 from avanhatt:docs_shift_masking
to bytecodealliance:main
:
The documentation strings for Clif operations in
instructions.rs
forushr
/ashr
use language that I suspect is stale: masking to size of the register. Update to match the doc string forishl
, which species masking to the size ofx
(which better describes what is done fori8
/i16
).For example, here the amount is masked based on i8, yielding 0:
function %f(i8) -> i8 { block0(v0: i8): v1 = iconst.i8 8 v2 = ushr v0, v1 return v2 } ; run: %f(0xFF) == 0xFF
This is a documentation-only change.
avanhatt requested jameysharp for a review on PR #6186.
avanhatt requested wasmtime-compiler-reviewers for a review on PR #6186.
avanhatt edited PR #6186:
The documentation strings for Clif operations in
instructions.rs
forushr
/sshr
use language that I suspect is stale: masking to size of the register. Update to match the doc string forishl
, which species masking to the size ofx
(which better describes what is done fori8
/i16
).For example, here the amount is masked based on i8, yielding 0:
function %f(i8) -> i8 { block0(v0: i8): v1 = iconst.i8 8 v2 = ushr v0, v1 return v2 } ; run: %f(0xFF) == 0xFF
This is a documentation-only change.
cfallin submitted PR review.
cfallin merged PR #6186.
Last updated: Dec 23 2024 at 12:05 UTC