Stream: git-wasmtime

Topic: wasmtime / PR #10830 x64: Migrate `bswap` to the new asse...


view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 15:34):

alexcrichton requested abrown for a review on PR #10830.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 15:34):

alexcrichton opened PR #10830 from alexcrichton:x64-bswa to bytecodealliance:main:

This instruction is encoded a bit differently than other instructions already supported where the main opcode byte additionally carries bits corresponding to the register being swapped.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 15:34):

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

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 15:35):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 15:35):

alexcrichton created PR review comment:

@abrown you might have a better idea of how to represent this, I just did a shot in the dark here

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 21:28):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 21:28):

abrown created PR review comment:

Well, we currently don't have support for the +rb, +rw, +rd, and +ro format modifiers as you note here; I needed them for some esoteric versions of mov but thought, "oh, maybe we won't need them." Give me a chance to model those modifiers in the DSL and then we could rebase this on top of that; sound good?

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 21:28):

abrown edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 22:19):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2025 at 22:19):

abrown created PR review comment:

Take a look at #10832?

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 00:54):

alexcrichton created PR review comment:

Nice that's much better :+1:

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 00:54):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:48):

alexcrichton updated PR #10830.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:49):

alexcrichton updated PR #10830.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:53):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:53):

alexcrichton created PR review comment:

Ok question on this one for you: for the 32-bit variant the Intel manual has 0F C8+rd so .rd() makes sense above for bswapl, but the 64-bit version has REX.W + 0F C8+rd in the manual. I've switched that to .ro() here given the assertions added in #10832 though. While I know pdf-search isn't great I wasn't able to actually find any instructions using +ro, but I could find some with +rd and +rw (also no hits with +rb).

Basically wanted to flag this, I'm not sure if it's something where we should relax the assertions here or if I'm missing something?

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:55):

abrown submitted PR review:

Cool! One refactoring nit if you like.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:56):

abrown submitted PR review:

Ok, here we go.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:56):

abrown created PR review comment:

We can probably just put Reg(dst) on its own to avoid the internal match?

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:58):

abrown submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2025 at 03:58):

abrown created PR review comment:

I saw that too and my take is that it is a typo in the manual. I'll flag it internally but I'm pretty confident that using ro is more consistent.

view this post on Zulip Wasmtime GitHub notifications bot (May 25 2025 at 04:15):

alexcrichton updated PR #10830.

view this post on Zulip Wasmtime GitHub notifications bot (May 25 2025 at 04:15):

alexcrichton has enabled auto merge for PR #10830.

view this post on Zulip Wasmtime GitHub notifications bot (May 25 2025 at 04:49):

alexcrichton merged PR #10830.


Last updated: Dec 06 2025 at 06:05 UTC