alexcrichton opened PR #8408 from alexcrichton:x64-refactor-cmp
to bytecodealliance:main
:
This PR is #8362 but for general purpose registers instead of xmm registers. Upon reading over the instructions in
inst.isle
it appears thatx64_cmp
and its variants is the only remaining (after #8362) instruction where the operands are not in left-to-right form. The purpose of this PR is to refactor this situation to make sure all instructions have left-to-right argument orderings in their instruction helpers.This PR is broken down into a number of small commits. Each commit swaps just one method and then handles all callers of that method. By the end all callers of all
cmp
instructions should have their operand order swapped. Note that special care was taken in Winch where there were a few swaps-of-swaps. For example thebranch
helper previously had a variable calledlhs
which actually was the right-hand-side of a comparison. This caused no issues for code today as all operations were reflexive or with the same value, but I've documented and ensured that lhs is now indeed the left-hand-side.My intention as well is that
./ci/run-tests.sh
passes at each individual commit here as well. CI won't test that, but if anyone's interested to check it should work.
alexcrichton requested elliottt for a review on PR #8408.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #8408.
github-actions[bot] commented on PR #8408:
Subscribe to Label Action
cc @saulecabrera
<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "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 <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton updated PR #8408.
elliottt submitted PR review:
This looks great to me, thank you for making this all so much more consistent! I went through the individual commits, and really appreciate you breaking this change out like that!
alexcrichton merged PR #8408.
Last updated: Nov 22 2024 at 16:03 UTC