Skip to content

winch(aarch64): Remove side effect from shift kind to ALUOp calculation#12501

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
saulecabrera:winch-aarch64-fix-shift
Feb 3, 2026
Merged

winch(aarch64): Remove side effect from shift kind to ALUOp calculation#12501
fitzgen merged 1 commit into
bytecodealliance:mainfrom
saulecabrera:winch-aarch64-fix-shift

Conversation

@saulecabrera
Copy link
Copy Markdown
Member

@saulecabrera saulecabrera commented Feb 3, 2026

Fixes #12423

Prior to this commit, calculating the ALUOp for the rotate left operation included a negation side-effect on the rotate operands. In the case of shift with immediate, the implementation was wrongly performing the negation on the rn register rather than using the immediate value, which resulted in the miscompilation described in the issue below.

This commit ensures that the conversion from the shift kind to the ALUOp is side-effect free.

Fixes bytecodealliance#12423

Prior to this commit, calculating the ALUOp for the rotate left
operation included a negation side-effect on the rotate operands. In
the case of shift with immediate, the implementation was wrongly
performing the negation on the `rn` register rather than using the
immediate value, which resulted in the mis-compilation described in
the issue below.

This commit ensures that the conversion from the shift kind to the
ALUOp is side-effect free.
@saulecabrera saulecabrera requested review from a team as code owners February 3, 2026 01:42
@saulecabrera saulecabrera requested review from fitzgen and removed request for a team February 3, 2026 01:42
@github-actions github-actions Bot added the winch Winch issues or pull requests label Feb 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 3, 2026

Subscribe to Label Action

cc @saulecabrera

Details This issue or pull request has been labeled: "winch"

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

  • saulecabrera: winch

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

Learn more.

Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@fitzgen fitzgen added this pull request to the merge queue Feb 3, 2026
Merged via the queue into bytecodealliance:main with commit 0158014 Feb 3, 2026
45 checks passed
@saulecabrera saulecabrera deleted the winch-aarch64-fix-shift branch February 3, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

winch Winch issues or pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Winch AArch64: Sha256 miscompile (wasmtime 41.0.0)

2 participants