From: lkcl Date: Wed, 8 Feb 2023 19:34:46 +0000 (+0000) Subject: (no commit message) X-Git-Tag: opf_rfc_ls001_v3~229 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c75093b34e7b9531c3ca80bf4e9310987dbe996;p=libreriscv.git --- diff --git a/openpower/sv/rfc/ls005.mdwn b/openpower/sv/rfc/ls005.mdwn index f19cf7fc5..ee986f3cd 100644 --- a/openpower/sv/rfc/ls005.mdwn +++ b/openpower/sv/rfc/ls005.mdwn @@ -110,4 +110,31 @@ the full width". ---------------- +# Examples + +add pseudocode examples demonstrating modification. + +before for popcntb: + +``` +do i = 0 to 7 + n <- 0 + do j = 0 to 7 + if (RS)[(i*8)+j] = 1 then + n <- n+1 + RA[(i*8):(i*8)+7] <- n +``` + +after: + +``` +do i = 0 to ((XLEN/8)-1) + n <- 0 + do j = 0 to 7 + if (RS)[(i*8)+j] = 1 then + n <- n+1 + RA[(i*8):(i*8)+7] <- n +``` + + \newpage{}