[Libre-soc-isa] [Bug 1077] evaluate removing /vec234 from instructions, move subvl to SVSTATE

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed May 3 09:54:03 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1077

--- Comment #11 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #10)
> (In reply to Jacob Lifshay from comment #8)
> 
> > or just remove subvl completely. 
> 
> no. that destroys PACK/UNPACK.

PACK/UNPACK can be entirely replaced by shuffles using matrix remaps (for
in-register or in-memory) or strided ld/st (for in-memory), so the
functionality isn't gone, it's just less accessible.

This is exactly what the strided ld/st instructions in vector ISAs are designed
for, PACK/UNPACK is just a less flexible version (only supports interleaved
data of all the same type with no holes) that works on more than just ld/st.

example:
# loading an array of rgb data into red, green, and blue vectors
# r3 = array ptr
# r4 = array len
# r32.. = red vector
# r40.. = green vector
# r48.. = blue vector
setvl 0, r4, 64, 0, 1, 1
lbz/elwid=8/els *r32, 3(r3)  # load every 3rd byte to r32..
addi r3, r3, 1  # increment starting address
lbz/elwid=8/els *r40, 3(r3)
addi r3, r3, 1
lbz/elwid=8/els *r48, 3(r3)

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


More information about the Libre-SOC-ISA mailing list