abrown opened PR #10845 from abrown:asm-vex-continued to bytecodealliance:main:
This change adapts the current VEX logic implemented in #10754 to look more like the current infrastructure. To do so:
- it factors out a
VexPrefixfrom the currentVexInstruction, allowing us to reuse existing logic for ModR/M and SIB bytes (these do are the same in both REX and VEX encodings)- it uses compile-time constant bits like the
Lorppfields directly, hopefully saving a bit on compile time- all of this allows more consistent code generation
On the DSL side, this significantly changes how one defines VEX instructions. Many helper methods are added and now documented. It also makes use of a slightly unrelated change included here: I factored out how any encoding can affect the ModR/M byte with
ModRmKind. Thisenumforces the DSL to pick only one of/ror/digitwhen defining instructions.<!--
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
-->
abrown requested cfallin for a review on PR #10845.
abrown requested wasmtime-compiler-reviewers for a review on PR #10845.
cfallin created PR review comment:
Could we define a
WBit(or pick your favorite name) enum here withWIG/W0/W1?
cfallin submitted PR review:
Looks reasonable!
abrown updated PR #10845.
abrown has enabled auto merge for PR #10845.
abrown merged PR #10845.
Last updated: Dec 06 2025 at 07:03 UTC