From: Luke Kenneth Casson Leighton Date: Tue, 31 Aug 2021 11:19:49 +0000 (+0100) Subject: adjusted popcntw to simplify by using temp vars X-Git-Tag: xlen-bcd~56 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc990388b1f29c87f4d7ff53edbef9d34312b6f8;p=openpower-isa.git adjusted popcntw to simplify by using temp vars https://bugs.libre-soc.org/show_bug.cgi?id=671#c50 e <- (XLEN/2)-1 s <- i*XLEN/2 --- diff --git a/openpower/isa/fixedlogical.mdwn b/openpower/isa/fixedlogical.mdwn index c301678c..3ab769d5 100644 --- a/openpower/isa/fixedlogical.mdwn +++ b/openpower/isa/fixedlogical.mdwn @@ -333,12 +333,14 @@ X-Form Pseudo-code: + e <- (XLEN/2)-1 do i = 0 to 1 + s <- i*XLEN/2 n <- 0 - do j = 0 to ((XLEN/2)-1) - if (RS)[(i*(XLEN/2))+j] = 1 then + do j = 0 to e + if (RS)[s+j] = 1 then n <- n+1 - RA[(i*(XLEN/2)):(i*(XLEN/2))+((XLEN/2)-1)] <- n + RA[s:s+e] <- n Special Registers Altered: