Stream: git-wasmtime

Topic: wasmtime / PR #8408 x64: Swap operand order of `cmp` in i...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 01:36):

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 that x64_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 the branch helper previously had a variable called lhs 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.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 01:36):

alexcrichton requested elliottt for a review on PR #8408.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 01:36):

alexcrichton requested wasmtime-compiler-reviewers for a review on PR #8408.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 02:00):

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:

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 02:17):

alexcrichton updated PR #8408.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 22:08):

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!

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2024 at 23:32):

alexcrichton merged PR #8408.


Last updated: Dec 23 2024 at 12:05 UTC