From: Jacob Lifshay Date: Fri, 28 Apr 2023 08:47:12 +0000 (-0700) Subject: fix u with int arguments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=98120dd1163e3e286ef527decf495612b5b745b8;p=openpower-isa.git fix u with int arguments --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index e90b68f1..37592fd0 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -528,17 +528,21 @@ def onebit(bit): def selectltu(lhs, rhs): """ less-than (unsigned) """ + if isinstance(lhs, SelectableInt): + lhs = lhs.value if isinstance(rhs, SelectableInt): rhs = rhs.value - return onebit(lhs.value < rhs) + return onebit(lhs < rhs) def selectgtu(lhs, rhs): """ greater-than (unsigned) """ + if isinstance(lhs, SelectableInt): + lhs = lhs.value if isinstance(rhs, SelectableInt): rhs = rhs.value - return onebit(lhs.value > rhs) + return onebit(lhs > rhs) # XXX this probably isn't needed...