alexcrichton opened PR #6485 from alexcrichton:x64-vpsraq to bytecodealliance:main:
This commit adds support for the AVX-512 instruction
vpsraqwhich is used to implement thesshroperation for thei64x2type. This instruction does not fit into any previous shape of supported AVX-512 instruction so new encoding support was added.Additionally the instruction helpers for this differ from
psra{w,d}where those two instructions are encoded with the second operand asXmmMemImm. The reason for this is thatpsra{w,d}are based on SSE encodings where a second argument ofXmmMemImmreflects what the instruction can do, butvpsraqhas two variants which subtly differ:(decl x64_vpsraq (Xmm XmmMem) Xmm) (decl x64_vpsraq_imm (XmmMem u8) Xmm)Notably the
*_immvariant can take a memory-based operand of what-to-shift unlike the SSE variant. Note thatvpsra{w,d}are additionally supported with AVX-512 encodings but support is not added for those in this commit (left for a future PR to do so). Additionally the two encodings ofvpsraqhave a differentTupleTypewhich at least necessitates different opcodes and naturally extends it self to different instruction helpers.<!--
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 abrown for a review on PR #6485.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #6485.
abrown submitted PR review:
LGTM!
abrown merged PR #6485.
Last updated: Dec 13 2025 at 19:03 UTC