bnjbvr opened PR #1584 from aarch64-rotations
to master
:
Given an integer size N, a left rotation of K
places is the same as a right rotation of N - K places. This means we
can use right rotations to implement left rotations too (a left rotation of 32/64 bits operands is now two instructions instead of 5).The Cranelift's rotation semantics are inherited from WebAssembly, which
mean the rotation count is truncated modulo the operand's bit size. Note
the ROR aarch64 instruction has the same semantics, which is nice (and the reason why only left rotations were incorrect).@cfallin PTAL!
bnjbvr requested cfallin for a review on PR #1584.
cfallin submitted PR Review.
bnjbvr updated PR #1584 from aarch64-rotations
to master
:
Given an integer size N, a left rotation of K
places is the same as a right rotation of N - K places. This means we
can use right rotations to implement left rotations too (a left rotation of 32/64 bits operands is now two instructions instead of 5).The Cranelift's rotation semantics are inherited from WebAssembly, which
mean the rotation count is truncated modulo the operand's bit size. Note
the ROR aarch64 instruction has the same semantics, which is nice (and the reason why only left rotations were incorrect).@cfallin PTAL!
bnjbvr merged PR #1584.
Last updated: Dec 23 2024 at 12:05 UTC