is applied *in general* to Scalar operations, just like the x86
`REP` instruction (if put on steroids).
-# EXTRA Pack/Unpack bits
+# Pack/Unpack
-The pack/unpack concept of VSX `vpack` is abstracted out as a Sub-Vector
-reordering Schedule.
-Two bits in the `RM` field
+The pack/unpack concept of VSX `vpack` is abstracted out as Sub-Vector
+reordering.
+Two bits in the `SVSHAPE` [[sv/spr]]
enable either "packing" or "unpacking"
on the subvectors vec2/3/4.
# yield an outer-SUBVL or inner VL loop with SUBVL
def index_p(outer):
if outer:
- for j in range(SUBVL):
- for i in range(VL):
+ for j in range(SUBVL): # subvl is outer
+ for i in range(VL): # vl is inner
yield i+VL*j
else:
- for i in range(VL):
- for j in range(SUBVL):
+ for i in range(VL): # vl is outer
+ for j in range(SUBVL): # subvl is inner
yield i*SUBVL+j
# walk through both source and dest indices simultaneously
dststep=0 dststep=1 dststep=2
0 3 1 4 2 5
-Setting of both `PACK_en` and `UNPACK_en` is neither prohibited nor
+Setting of both `PACK` and `UNPACK` is neither prohibited nor
`UNDEFINED` because the reordering is fully deterministic, and
additional REMAP reordering may be applied. Combined with
Matrix REMAP this would
give potentially up to 4 Dimensions of reordering.
-Pack/Unpack applies primarily to mv operations, mv.swizzle,
-and some other single-source
-single-destination operations such as Indexed LD/ST and extsw.
-[[sv/mv.swizzle]] has a slightly different pseudocode algorithm
+Pack/Unpack has quirky interactions on
+[[sv/mv.swizzle]] because it can set a different subvector length for
+destination, and has a slightly different pseudocode algorithm
for Vertical-First Mode.
+Pack/Unpack is enabled (set up) through [[sv/setvl]].
+
# Reduce modes
Reduction in SVP64 is deterministic and somewhat of a misnomer. A normal