From 7facebc376274d533c49f34f0b296154ab30f044 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 28 Apr 2023 01:47:12 -0700 Subject: [PATCH] fix u with int arguments --- src/openpower/decoder/selectable_int.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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... -- 2.30.2