From 2c75093b34e7b9531c3ca80bf4e9310987dbe996 Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 8 Feb 2023 19:34:46 +0000 Subject: [PATCH] --- openpower/sv/rfc/ls005.mdwn | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) 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{} -- 2.30.2