Stream: git-wasmtime

Topic: wasmtime / PR #2699 [x64] Add i64x2.abs


view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:10):

abrown opened PR #2699 from i64x2-abs to main:

This instruction has a single instruction lowering in AVX512F/VL and a three instruction lowering in AVX but neither is currently supported in the x64 backend. To implement this, we instead subtract the vector from 0 and use a blending instruction to pick the lanes containing the absolute value.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:11):

abrown submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:11):

abrown created PR Review Comment:

@cfallin, I am suspicious about the src.clone() above as well as the Writable::from_reg(regs::xmm0())... am I breaking anything?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:11):

abrown requested cfallin for a review on PR #2699.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:29):

abrown updated PR #2699 from i64x2-abs to main.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:42):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:42):

cfallin created PR Review Comment:

I think this should be fine -- cloning the source is harmless (its live range will extend until its last use), and the explicit Writable coercion is fine with a fixed reg (we don't have a helper like writable_xmm0()). And no issues with the fixed reg use vs. src -- its live-range overlaps with src so the register allocator will know to move src elsewhere if originally in xmm0.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 18:43):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 02 2021 at 20:30):

abrown merged PR #2699.


Last updated: Oct 23 2024 at 20:03 UTC