If VLI (Vector Length Inclusive) is clear,
VL is truncated to *exclude* the current element, otherwise it is
included. SVSTATE.MVL is not altered: only VL.
-* **LRu**: Link Register Update. When set, Link Register will
- only be updated if the Branch Condition succeeds. This avoids
+* **LRu**: Link Register Update, used in conjunction with LK=1.
+ When LRu=1,LK=1, Link Register will
+ only be updated if the Branch Condition succeeds.
+ When LRu=0,LK=1, Link Register will only be updated if
+ the Branch Condition fails. This avoids
destruction of LR during loops (particularly Vertical-First
ones).
* **VSb** In VLSET Mode, after testing,
if ctr_ok & cond_ok then
if AA then NIA <-iea EXTS(BD || 0b00)
else NIA <-iea CIA + EXTS(BD || 0b00)
- lr_ok <- 0b1
+ lr_ok <- ¬lr_ok
if LK & lr_ok then LR <-iea CIA + 4
```
if cond_ok then
if AA then NIA <-iea EXTS(BD || 0b00)
else NIA <-iea CIA + EXTS(BD || 0b00)
- lr_ok <- 0b1
+ lr_ok <- ¬lr_ok
if LK & lr_ok then LR <-iea CIA + 4
```
cond_ok <- BO[0] | ¬(CR[BI+32] ^ BO[1])
if ctr_ok & cond_ok then
NIA <-iea LR[0:61] || 0b00
- lr_ok = 1
+ lr_ok = ¬lr_ok
if LK & lr_ok then LR <-iea CIA + 4
```
# this completely violates the design principle of SVP64
# and would actually need to be a separate (scalar)
# instruction "set LR to CIA+4 but retrospectively"
+# which is clearly impossible
if LK then LR <-iea CIA + 4
```