Skip to content

aarch64: add shims for pairwise widening/wrapping addition#4912

Merged
RalfJung merged 1 commit into
rust-lang:masterfrom
folkertdev:aarch64-pairwise-add
Mar 30, 2026
Merged

aarch64: add shims for pairwise widening/wrapping addition#4912
RalfJung merged 1 commit into
rust-lang:masterfrom
folkertdev:aarch64-pairwise-add

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

Combined with #4899 this is sufficient to run the zlib-rs crc32 tests.

With LLVM 23 I believe that these implementations should no longer be needed because the stdarch implementation can use portable intrinsics. Until then, we do need them, and the test coverage is nice regardless.

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 21, 2026

Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two.
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

Comment thread src/shims/aarch64.rs
Comment thread src/shims/aarch64.rs Outdated
Comment thread src/shims/aarch64.rs Outdated

// Use wrapping addition on u128 to simulate
// widening addition for the destination type.
let sum = a_val.wrapping_add(b_val);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this be strict_add? An overflow would lose data which sounds bad. (Probably also applies above.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think it matters because it's widening. I'll change it though

@RalfJung
Copy link
Copy Markdown
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Mar 29, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 29, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Copy link
Copy Markdown
Contributor Author

@folkertdev folkertdev left a comment

Choose a reason for hiding this comment

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

Comment thread src/shims/aarch64.rs
@rustbot rustbot added S-waiting-on-review Status: Waiting for a review to complete and removed S-waiting-on-author Status: Waiting for the PR author to address review comments labels Mar 29, 2026
Comment thread src/shims/aarch64.rs Outdated
@folkertdev folkertdev force-pushed the aarch64-pairwise-add branch from f9cd75e to 0c36d8a Compare March 30, 2026 11:34
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 30, 2026

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@RalfJung
Copy link
Copy Markdown
Member

This looks great, thanks! Please squash the commits. You can squash manually if there are multiple independent commits you want to preserve, or use ./miri squash (make sure to pick a suitable commit message). Then write @rustbot ready after you force-pushed the squashed PR.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: Waiting for the PR author to address review comments and removed S-waiting-on-review Status: Waiting for a review to complete labels Mar 30, 2026
@folkertdev folkertdev force-pushed the aarch64-pairwise-add branch from 9327d7c to 0fed718 Compare March 30, 2026 11:45
@RalfJung RalfJung enabled auto-merge March 30, 2026 11:47
@RalfJung RalfJung added this pull request to the merge queue Mar 30, 2026
Merged via the queue into rust-lang:master with commit 7662148 Mar 30, 2026
13 checks passed
@rustbot rustbot removed the S-waiting-on-author Status: Waiting for the PR author to address review comments label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants