From: Luke Kenneth Casson Leighton Date: Fri, 1 Jul 2022 15:15:21 +0000 (+0100) Subject: clarify swizzle pseudocode in overview X-Git-Tag: opf_rfc_ls005_v1~1419 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f524730305ba11c7b034b68156f31b41c8ca427;p=libreriscv.git clarify swizzle pseudocode in overview --- diff --git a/openpower/sv/overview.mdwn b/openpower/sv/overview.mdwn index 24f1ec7f4..804d7042a 100644 --- a/openpower/sv/overview.mdwn +++ b/openpower/sv/overview.mdwn @@ -729,13 +729,13 @@ those: swizzle = get_swizzle_immed() # 12 bits for (s = 0; s < SUBVL; s++) remap = (swizzle >> 3*s) & 0b111 - if remap < 4: - sm = id*SUBVL + remap + if remap == 0b000: continue # skip + if remap == 0b001: break # end marker + if remap == 0b010: ireg[rd+s] <= 0.0 # constant 0 + elif remap == 0b011: ireg[rd+s] <= 1.0 # constant 1 + else: # XYZW + sm = id*SUBVL + (remap-4) ireg[rd+s] <= ireg[RA+sm] - elif remap == 4: - ireg[rd+s] <= 0.0 - elif remap == 5: - ireg[rd+s] <= 1.0 Note that a value of 6 (and 7) will leave the target subvector element untouched. This is equivalent to a predicate mask which is built-in,