alexcrichton requested abrown for a review on PR #10834.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #10834.
alexcrichton opened PR #10834 from alexcrichton:x64-xmm-mov to bytecodealliance:main:
This commit migrates xmm movement-style instructions, such as
mov{s{s,d},{a,u}p{s,d},dq{a,u}}to the new assembler. This enables deleting theXmmMovRMclass of instructions in ISLE. Along the way a number of notable changes were made:
- The emission of
XmmCmovenow properly usesmovssfor 32-bit floats instead ofmovsd(accident from #4317)- ISLE constructors for assembler instructions now take
SyntheticAmodeinstead ofAmodesince it's already supported anyway and it's a more flexible argument to take.- Some
Intoimpls were swapped toFromimpls since that's a more generic way of implementing theIntoandFromtraits.- The conversion from
SyntheticAmodeto the assemblerAmode<Gpr>was fixed where one variant needed to userspinstead ofrbp.- The
is_movemethod was updated to ignoremovssandmovsdinstructions since they're not true movement-related instructions in register-to-register situations.<!--
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-core-reviewers for a review on PR #10834.
alexcrichton requested dicej for a review on PR #10834.
alexcrichton commented on PR #10834:
@abrown IIRC you said you were working on mov instructions, which I'm realize now I assumed meant integer-related ones, but if this overlaps with what you've done I'm happy to close this and defer to your work
github-actions[bot] commented on PR #10834:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "cranelift:meta", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
alexcrichton updated PR #10834.
alexcrichton edited PR #10834:
This commit migrates xmm movement-style instructions, such as
mov{s{s,d},{a,u}p{s,d},dq{a,u}}to the new assembler. This enables deleting theXmmMovRMclass of instructions in ISLE. Along the way a number of notable changes were made:
- The emission of
XmmCmovenow properly usesmovssfor 32-bit floats instead ofmovsd(accident from #4317)- ISLE constructors for assembler instructions now take
SyntheticAmodeinstead ofAmodesince it's already supported anyway and it's a more flexible argument to take.Somemoved to https://github.com/bytecodealliance/wasmtime/pull/10837Intoimpls were swapped toFromimpls since that's a more generic way of implementing theIntoandFromtraits.- The conversion from
SyntheticAmodeto the assemblerAmode<Gpr>was fixed where one variant needed to userspinstead ofrbp.- The
is_movemethod was updated to ignoremovssandmovsdinstructions since they're not true movement-related instructions in register-to-register situations.<!--
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 edited PR #10834:
This commit migrates xmm movement-style instructions, such as
mov{s{s,d},{a,u}p{s,d},dq{a,u}}to the new assembler. This enables deleting theXmmMovRMclass of instructions in ISLE. Along the way a number of notable changes were made:
The emission ofsplit out into https://github.com/bytecodealliance/wasmtime/pull/10839XmmCmovenow properly usesmovssfor 32-bit floats instead ofmovsd(accident from #4317)- ISLE constructors for assembler instructions now take
SyntheticAmodeinstead ofAmodesince it's already supported anyway and it's a more flexible argument to take.Somemoved to https://github.com/bytecodealliance/wasmtime/pull/10837Intoimpls were swapped toFromimpls since that's a more generic way of implementing theIntoandFromtraits.- The conversion from
SyntheticAmodeto the assemblerAmode<Gpr>was fixed where one variant needed to userspinstead ofrbp.- The
is_movemethod was updated to ignoremovssandmovsdinstructions since they're not true movement-related instructions in register-to-register situations.<!--
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 commented on PR #10834:
Converting this to a draft, thinking it's best to split pieces out into separate PRs.
alexcrichton updated PR #10834.
alexcrichton edited PR #10834:
This commit migrates xmm movement-style instructions, such as
mov{s{s,d},{a,u}p{s,d},dq{a,u}}to the new assembler. This enables deleting theXmmMovRMclass of instructions in ISLE. Along the way a number of notable changes were made:
- ISLE constructors for assembler instructions now take
SyntheticAmodeinstead ofAmodesince it's already supported anyway and it's a more flexible argument to take.- The conversion from
SyntheticAmodeto the assemblerAmode<Gpr>was fixed where one variant needed to userspinstead ofrbp.- The
is_movemethod was updated to ignoremovssandmovsdinstructions since they're not true movement-related instructions in register-to-register situations.<!--
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 has marked PR #10834 as ready for review.
alexcrichton commented on PR #10834:
Ok just kidding, back to being ready. I ideally wanted to split out the
SyntheticAmodeand update from rbp to rsp, but there was nothing exercising it previously so I think it makes sense to include here instead.
abrown assigned abrown to PR #10834.
abrown commented on PR #10834:
@abrown IIRC you said you were working on mov instructions, which I'm realize now I assumed meant integer-related ones, but if this overlaps with what you've done I'm happy to close this and defer to your work
I did have some of these as well but I'm happy to rebase on this because hadn't made it to the "fix up all the Rust uses" part. Speaking of: as I glanced at this, does it make sense to use
Inst::gen_movemore liberally? Or perhaps addInst::loadandInst::store? Some of the Rust bits seemed like code that we could hide away: "unwrap four levels, rewrap with new types." I'll take a closer look at this tomorrow!
alexcrichton updated PR #10834 (assigned to abrown).
alexcrichton commented on PR #10834:
Good point! I updated Winch to use
gen_move, butload/storeare currentlypub(crate)and inaccessible to Winch. I'm happy to make thosepubbut also we just talked in the Cranelift meeting about having lesspubso I hesitated and figured I'd avoid changing it for now
abrown submitted PR review:
Looks good to me! I'll add the scalar moves on top of this.
abrown merged PR #10834.
Last updated: Dec 06 2025 at 06:05 UTC