From: Luke Kenneth Casson Leighton Date: Fri, 23 Sep 2022 19:12:05 +0000 (+0100) Subject: put back the barse-ackward decode_bo inversion of {inv||CR_bit} X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8d36e83162d65f6c89d64ac212b81b655ff648d;p=openpower-isa.git put back the barse-ackward decode_bo inversion of {inv||CR_bit} --- diff --git a/src/openpower/sv/trans/svp64.py b/src/openpower/sv/trans/svp64.py index edd4f2b7..8a6d271a 100644 --- a/src/openpower/sv/trans/svp64.py +++ b/src/openpower/sv/trans/svp64.py @@ -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