(no commit message)
authorlkcl <lkcl@web>
Sun, 12 Jun 2022 17:02:42 +0000 (18:02 +0100)
committerIkiWiki <ikiwiki.info>
Sun, 12 Jun 2022 17:02:42 +0000 (18:02 +0100)
openpower/sv/mv.swizzle.mdwn

index d204afc3f4d8d9cd13a6bdf5af661db620431cd0..282fb35b1b93af9bb64949c163ce44586beb0fcd 100644 (file)
@@ -154,7 +154,9 @@ Swizzle Pseudocode (when SRC_SUBVL=SUBVL):
     swiz[3] = imm[9:12]  # W
     # determine implied subvector length from Swizzle
     for i in range(4):
-        if swiz[i] != 0b000: subvlen = i
+        if swiz[i] != 0b000: subvlen = i+1
+    for i in range(4):
+        if swiz[i] >= 0b100: subvlen = max(subvlen, swiz[i]-3)
     source_subvl = subvlen
     dest_subvl = SUBVL
 ```