(no commit message)
authorlkcl <lkcl@web>
Mon, 20 Jun 2022 11:04:53 +0000 (12:04 +0100)
committerIkiWiki <ikiwiki.info>
Mon, 20 Jun 2022 11:04:53 +0000 (12:04 +0100)
openpower/sv/vector_ops.mdwn

index 0c419752281fd7359f2efe008548cf472963407d..d22dfb5bce485071dfdb71bc6a79adab60d1b9c6 100644 (file)
@@ -207,36 +207,11 @@ The vector mask set-including-first instruction is similar to set-before-first,
                        vmsif.m v2, v3, v0.t
      1 1 x x x x 1 1   v2 contents
 
-Pseudo-code:
-
-    def sif(rd, rs1, rs2):
-        rd = 0
-        setting_mode = rs2 == x0 or (regs[rs2] & 1)
-
-        while i < XLEN:
-            bit = 1<<i
-
-            # only reenable when predicate in use, and bit valid
-            if !setting_mode && rs2 != x0:
-                if (regs[rs2] & bit):
-                    # back into "setting" mode
-                    setting_mode = True
-
-            # skipping mode
-            if !setting_mode:
-                # skip any more 1s
-                if regs[rs1] & bit == 1:
-                    i += 1
-                    continue
-
-            # setting mode, search for 1
-            regs[rd] |= bit # always set during search
-            if regs[rs1] & bit: # found a bit in rs1:
-                setting_mode = False
-                # next loop starts skipping
-
-            i += 1
+Executable demo:
 
+```
+[[!inline quick="yes" raw="yes" pages="openpower/sv/sbf.py"]]
+```
 
 ## vmsof