From: lkcl Date: Sat, 28 May 2022 18:08:08 +0000 (+0100) Subject: (no commit message) X-Git-Tag: opf_rfc_ls005_v1~2048 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f82395e9cf5a4c286290431edc0666db709be3d;p=libreriscv.git --- diff --git a/openpower/sv/branches.mdwn b/openpower/sv/branches.mdwn index 8b2738148..3ed17ab84 100644 --- a/openpower/sv/branches.mdwn +++ b/openpower/sv/branches.mdwn @@ -728,7 +728,20 @@ end: ``` # TODO LRu example -show why LRu would be useful in a loop. +show why LRu would be useful in a loop. Imagine the following +c code: + +``` +for (int i = 0; i < 8; i++) { + if (x < y) break; +} +``` + +Under these circumstances exiting from the loop is not only +based on CTR it has become conditional on a CR result. +Thus it is desirable that NIA *and* LR only be modified +if the conditions are met + v3.0 pseudocode for `bclrl`: