Stream: git-wasmtime

Topic: wasmtime / PR #6485 x64: Add support for `vpsraq`


view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 18:36):

alexcrichton opened PR #6485 from alexcrichton:x64-vpsraq to bytecodealliance:main:

This commit adds support for the AVX-512 instruction vpsraq which is used to implement the sshr operation for the i64x2 type. 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 as XmmMemImm. The reason for this is that psra{w,d} are based on SSE encodings where a second argument of XmmMemImm reflects what the instruction can do, but vpsraq has two variants which subtly differ:

(decl x64_vpsraq (Xmm XmmMem) Xmm)
(decl x64_vpsraq_imm (XmmMem u8) Xmm)

Notably the *_imm variant can take a memory-based operand of what-to-shift unlike the SSE variant. Note that vpsra{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 of vpsraq have a different TupleType which at least necessitates different opcodes and naturally extends it self to different instruction helpers.

<!--
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 31 2023 at 18:36):

alexcrichton requested abrown for a review on PR #6485.

view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 18:36):

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

view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 20:00):

abrown submitted PR review:

LGTM!

view this post on Zulip Wasmtime GitHub notifications bot (May 31 2023 at 20:41):

abrown merged PR #6485.


Last updated: Oct 23 2024 at 20:03 UTC