fixedlogical: switch popcntw to XLEN
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Wed, 25 Aug 2021 14:52:01 +0000 (14:52 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Mon, 30 Aug 2021 19:46:40 +0000 (19:46 +0000)
openpower/isa/fixedlogical.mdwn

index 039f5cb95c2ae7ace7dbc5264b6cdd02063ab769..10fab1343bc4cbf4b7b6d148e9f7a13b52967e0b 100644 (file)
@@ -335,10 +335,10 @@ Pseudo-code:
 
     do i = 0 to 1
        n <-  0
-       do j = 0 to 31
-          if (RS)[(i*32)+j] = 1 then
+       do j = 0 to ((XLEN/2)-1)
+          if (RS)[(i*(XLEN/2))+j] = 1 then
               n <- n+1
-       RA[(i*32):(i*32)+31] <- n
+       RA[(i*(XLEN/2)):(i*(XLEN/2))+((XLEN/2)-1)] <- n
 
 Special Registers Altered: