comparefixed: switch cmpeqb to XLEN
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sat, 4 Sep 2021 18:05:40 +0000 (18:05 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sat, 4 Sep 2021 18:05:47 +0000 (18:05 +0000)
openpower/isa/comparefixed.mdwn

index ea4248cb8490cbad9b57a78f632a18b2bac7b5c6..af92870a9ff500e968286dd6615d5b5868c6203f 100644 (file)
@@ -127,15 +127,10 @@ X-Form
 Pseudo-code:
 
     src1 <- GPR[RA]
-    src1 <- src1[56:63]
-    match <- ((src1 = (RB)[00:07]) |
-              (src1 = (RB)[08:15]) |
-              (src1 = (RB)[16:23]) |
-              (src1 = (RB)[24:31]) |
-              (src1 = (RB)[32:39]) |
-              (src1 = (RB)[40:47]) |
-              (src1 = (RB)[48:55]) |
-              (src1 = (RB)[56:63]))
+    src1 <- src1[XLEN-8:XLEN-1]
+    match <- 0b0
+    for i = 0 to ((XLEN/8)-1)
+        match <- (match | (src1 = (RB)[8*i:8*i+7]))
     CR[4*BF+32] <- 0b0
     CR[4*BF+33] <- match
     CR[4*BF+34] <- 0b0