(no commit message)
[libreriscv.git] / openpower / sv / branches.mdwn
index 07643dc4c9599eaa19fc34bbbeafbb5d6b523dda..d4487dba9b0d077ee128e2883df3301dcc3316be 100644 (file)
@@ -91,8 +91,9 @@ Predication in both INT and CR modes may be applied to `sv.bc` and other
 SVP64 Branch Conditional operations, exactly as they may be applied to
 other SVP64 operations.  When `sz` is zero, any masked-out Branch-element
 operations are not included in condition testing, exactly like all other
-SVP64 operations. With one exception this *includes* side-effects such as potentially updating
-LR and CTR which will also be skipped. The exception here is when
+SVP64 operations, *including* side-effects such as potentially updating
+LR or CTR, which will also be skipped. There is *one* exception here,
+which is when
 `BO[2]=0, sz=0, CTR-test=0, CTi=1` and the relevant element
 predicate mask bit is also zero:
 under these special circumstances CTR will also decrement.
@@ -157,7 +158,15 @@ of a given loop. The potential combinations of interactions is why CTR
 testing options have been added.
 
 If both CTR-test and VLSET Modes are requested, then because the CTR decrement is on a per element basis, the total amount that CTR is decremented
-by will end up being VL *after* truncation (should that occur).
+by will end up being VL *after* truncation (should that occur). In
+other words, the order is (as can be seen in pseudocode, below):
+
+1. compute the test
+2. (optionally) decrement CTR
+3. (optionally) truncate VL
+4. decide (based on step 1) whether to terminate looping
+   (including not executing step 5)
+5. decide whether to branch.
 
 CTR-test mode and CTi interaction is as follows: note that
 `BO[2]` is still required to be clear for decrements to be
@@ -168,7 +177,7 @@ considered.
   skipped.
 * **CTR-test=0, CTi=1**: CTR decrements on a per-element basis
   if `BO[2]` is zero and a masked-out element is skipped
-  (`sz=0` and predicate bit is zero). This one case is the
+  (`sz=0` and predicate bit is zero). This one special case is the
   **opposite** of other combinations.
 * **CTR-test=1, CTi=0**: CTR decrements on a per-element basis
   if `BO[2]` is zero and the Condition Test succeeds.