From cc990388b1f29c87f4d7ff53edbef9d34312b6f8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 31 Aug 2021 12:19:49 +0100 Subject: [PATCH] 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 --- openpower/isa/fixedlogical.mdwn | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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: -- 2.30.2