arm64: Support less-than-64-bit integers in Bitrev, Clz, Cls, and Popcnt instructions. #1528
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for 8- and 16-bit cases of bitrev, clz, cls and popcnt.
Also includes a temporary bugfix for popcnt with 32-bit operand. The popcnt
issue was initially identified by Benjamin Bouvier <public@benj.me>, and
the root cause was debugged by Joey Gouly <joey.gouly@arm.com>`. The
part of this patch related to 32-bit popcnt is simply a quick fix that zero-extends
the operand to 64 bits; Joey plans to contribute a more permanent fix shortly.
Rebased from commits
7e915fa4f443373d7483392637905dc299ab1c67
,bb47c80dbe4aae7d631e9878ad7808cd96f50299
and7a2eda3f54593bc2249a63bfb1f17a0dd18f8eaf
on thearm64
development branch, which landed there after our initial merge.