Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64: Support less-than-64-bit integers in Bitrev, Clz, Cls, and Popcnt instructions. #1528

Merged
merged 1 commit into from
Apr 18, 2020

Conversation

cfallin
Copy link
Member

@cfallin cfallin commented Apr 16, 2020

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 and 7a2eda3f54593bc2249a63bfb1f17a0dd18f8eaf on the arm64 development branch, which landed there after our initial merge.

@cfallin
Copy link
Member Author

cfallin commented Apr 16, 2020

r? @bnjbvr or @julian-seward1

cc @jgouly.

@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Apr 16, 2020
@github-actions
Copy link

Subscribe to Label Action

cc @bnjbvr

This issue or pull request has been labeled: "cranelift"

Thus the following users have been cc'd because of the following labels:

  • bnjbvr: cranelift

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

cranelift/codegen/src/isa/aarch64/lower.rs Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/aarch64/lower.rs Show resolved Hide resolved
cranelift/codegen/src/isa/aarch64/lower.rs Outdated Show resolved Hide resolved
@cfallin
Copy link
Member Author

cfallin commented Apr 17, 2020

Updated, thanks!

…cnt instructions.

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>. This
patch is simply a quick fix that zero-extends the operand to 64 bits;
Joey plans to contribute a more permanent fix shortly (tracked in
 bytecodealliance#1537).
@cfallin cfallin merged commit d2eb56c into bytecodealliance:master Apr 18, 2020
@cfallin cfallin added the cranelift:area:aarch64 Issues related to AArch64 backend. label Apr 18, 2020
@cfallin cfallin deleted the aarch64-bit-ops-fix branch May 6, 2020 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:aarch64 Issues related to AArch64 backend. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants