put back the barse-ackward decode_bo inversion of {inv||CR_bit}
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Sep 2022 19:12:05 +0000 (20:12 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 23 Sep 2022 19:12:05 +0000 (20:12 +0100)
src/openpower/sv/trans/svp64.py

index edd4f2b7edc52884fab25e03c454e21b38367486..8a6d271a6ca8f1a13b69ebf8ea249e01158277c3 100644 (file)
@@ -666,7 +666,9 @@ def decode_bo(encoding):
     }
     assert encoding in pmap, \
         "encoding %s for BO Mode not recognised" % encoding
-    return pmap[encoding]
+    # barse-ackwards MSB0/LSB0. sigh
+    mapped = pmap[encoding]
+    return int(bin(mapped)[:1:-1], 2) # to 0bNNN, reverse-and-strip b0, base2
 
 
 # partial-decode fail-first mode