From: lkcl Date: Mon, 13 Jun 2022 13:36:00 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~1816 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6563cf644bb65c9347f4d561c8cba805a1ec1c00;p=libreriscv.git --- diff --git a/openpower/sv/mv.swizzle.mdwn b/openpower/sv/mv.swizzle.mdwn index d41944e1d..1e2ce0f7e 100644 --- a/openpower/sv/mv.swizzle.mdwn +++ b/openpower/sv/mv.swizzle.mdwn @@ -47,7 +47,7 @@ to each: the options for each Swizzle are: * 0b000 to indicate "skip". this is equivalent to predicate masking -* 0b001 is not needed (reserved) +* 0b001 subvector length end marker (length=4 if not present) * 0b010 to indicate "constant 0" * 0b011 to indicate "constant 1" (or 1.0) * 0b1NN index 0 thru 3 to copy from subelement in pos XYZW @@ -150,19 +150,21 @@ Swizzle Pseudocode: swiz[0] = imm[0:3] # X swiz[1] = imm[3:6] # Y swiz[2] = imm[6:9] # Z - swiz[3] = imm[9:12] # W, maybe - # determine Subvector lengths - subvl = MAX(SRC_SUBVL, SUBVL) - if subvl == 4: - src_subvl = 4 - else: - src_subvl = swiz[3] - dest_subvl = subvl + swiz[3] = imm[9:12] # W + # determine implied subvector length from Swizzle + dst_subvl = 4 + for i in range(4): + if swiz[i] == 0b001: dst_subvl = i+1 + # source subvector length is maximum of both RM fields + src_subvl = MAX(SRC_SUBVL, SUBVL) ``` What is going on here is that the option is provided to have different source and destination subvector lengths, by exploiting redundancy in -the Swizzle Immediate. +the Swizzle Immediate. With the Swizzles marking what goes into +each destination position, the marker "0b001" may be used to indicate +the end. If no marker is present then the destination subvector length +may be assimed to be 4. # RM Mode Concept: