alexcrichton requested abrown for a review on PR #10830.
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:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #10830.
alexcrichton submitted PR review.
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
abrown submitted PR review.
abrown created PR review comment:
Well, we currently don't have support for the
+rb,+rw,+rd, and+roformat modifiers as you note here; I needed them for some esoteric versions ofmovbut 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?
abrown edited PR review comment.
abrown submitted PR review.
abrown created PR review comment:
Take a look at #10832?
alexcrichton created PR review comment:
Nice that's much better :+1:
alexcrichton submitted PR review.
alexcrichton updated PR #10830.
alexcrichton updated PR #10830.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Ok question on this one for you: for the 32-bit variant the Intel manual has
0F C8+rdso.rd()makes sense above forbswapl, but the 64-bit version hasREX.W + 0F C8+rdin 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+rdand+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?
abrown submitted PR review:
Cool! One refactoring nit if you like.
abrown submitted PR review:
Ok, here we go.
abrown created PR review comment:
We can probably just put
Reg(dst)on its own to avoid the internal match?
abrown submitted PR review.
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
rois more consistent.
alexcrichton updated PR #10830.
alexcrichton has enabled auto merge for PR #10830.
alexcrichton merged PR #10830.
Last updated: Dec 06 2025 at 06:05 UTC