From: lkcl Date: Sun, 12 Jun 2022 16:41:19 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~1824 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3abea63a3102d3c9d57b5315ef793c2918065bfc;p=libreriscv.git --- diff --git a/openpower/sv/mv.swizzle.mdwn b/openpower/sv/mv.swizzle.mdwn index b54ceac5a..bc7a90fe3 100644 --- a/openpower/sv/mv.swizzle.mdwn +++ b/openpower/sv/mv.swizzle.mdwn @@ -145,11 +145,42 @@ permitted to be serviced. Out-of-Order Micro-architectures may of course cancel the in-flight instruction as usual if the Interrupt requires fast servicing. +Determining the source and destination subvector lengths is tricky +because of the built-in static predicate mask. Swizzle Pseudocode (when SRC_SUBVL=SUBVL): ``` + swiz[0] = imm[0:3] # X + swiz[1] = imm[3:6] # Y + swiz[2] = imm[6:9] # Z + swiz[3] = imm[9:12] # W + # determine implied subvector length from Swizzle + for i in range(4): + if swiz[i] != 0b000: subvlen = i + source_subvl = subvlen + dest_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. + +Example 1: + +A SUBVL of 2 with a Swizzle "ZW00" (or anything +in the top 2 swizzle positions) allows for copying any two elements +from a vec4 into a vec2. + +Example 2: + +A SUBVL of 2 with a Swizzle "XX0." allows for copying from a vec3 +to a vec2 + +Example 3: + +A SUBVL of 3 with a Swizzle "YX.." allows a vec2 to be copied to a vec3 + +Example 4: # RM Mode Concept: