[libre-riscv-dev] [Bug 139] Add LD.X and ST.X? Strided

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Thu Oct 3 14:04:40 BST 2019


http://bugs.libre-riscv.org/show_bug.cgi?id=139

--- Comment #7 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #4)

> > Also how or does SUBVL interact here?
> 
> Swizzles (different than shuffle) are usually at the intra-subvector level
> (same VL index over all input/output vectors), 

so SUBVL=4, then LD.swizzle-immediate="yzxw" would do reordering:

* SUBVL-element 0 goes into position/strided-offset y (1)
* SUBVL-element 1 goes into position/strided-offset z (2)
* SUBVL-element 2 goes into position/strided-offset x (0)
* SUBVL-element 3 goes into position/strided-offset w (3)

something like that?

> inter-subvector swizzle would
> be a separate instruction if needed (much less common, can fall back to
> mv.x).

i still can't see how vector-based (SUBVL=1) swizzle would even work,
with swizzles being only in the range 0-3.

for sub-vectors we get away with an 8-bit immediate or a register where
only the first 8 bits are used.

for the case where SUBVL=1, where would you even _start_ the swizzling
from?  the extreme case it actually turns into a VINDEXed gather/scatter
(so, yes, MV.X)


half-way in between, for when SUBVL=1, doesn't really seem to work.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-riscv-dev mailing list