[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:15:20 BST 2019


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

--- Comment #8 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #7)
> (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?

yeah, though swizzles specify which source element each dest. element comes
from rather than the other way around, because that allows a swizzle xxwz where
one source element (x) is duplicated and another (y) is ignored completely.

> 
> > 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 a single input swizzle with SUBVL=1, identity or constant are the only
allowed swizzles.

Do note that Vulkan allows swizzles to set elements to constant 0, 1, min/max
int/uint, and 1.0 as well as x, y, z, or w.

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


More information about the libre-riscv-dev mailing list