WebAssembly / flexible-vectors

Vector operations for WebAssembly
https://webassembly.github.io/flexible-vectors/
Other
48 stars 6 forks source link

Replace `LaneIdx` immediates with integers #47

Closed penzn closed 2 years ago

penzn commented 2 years ago

Change current extract and replace lane operations to use immediate indices within lower 128 bits of the vector (compatible to current standard). Keep description of immediates identical to what is used in current SIMD.

Add two more flavors for extract and replace lane operations: one containing a bounds check and the other taking the index value modulo number of lanes in the vector.

Update opcodes to reflect new operations and changes in the names.

Minor housekeeping: set length should take an immediate, note on AVX512.

penzn commented 2 years ago

In short, there are three approaches to lane indices in this set up:

And we can have all of that, especially at this stage of the proposal.