From 09ac856dba6eb9b96a13b84a8e175152ff7bcb8f Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 23 Sep 2022 20:20:39 +0100 Subject: [PATCH] remove barse-ackwardsness, use SelectableInt() in decode_bo --- src/openpower/sv/trans/svp64.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openpower/sv/trans/svp64.py b/src/openpower/sv/trans/svp64.py index 8a6d271a..6037de94 100644 --- a/src/openpower/sv/trans/svp64.py +++ b/src/openpower/sv/trans/svp64.py @@ -668,7 +668,10 @@ def decode_bo(encoding): "encoding %s for BO Mode not recognised" % encoding # barse-ackwards MSB0/LSB0. sigh mapped = pmap[encoding] - return int(bin(mapped)[:1:-1], 2) # to 0bNNN, reverse-and-strip b0, base2 + si = SelectableInt(0, 3) + si[0] = mapped>>2 + si[1:3] = mapped & 3 + return int(si) # partial-decode fail-first mode -- 2.30.2