From 489305f987997f778f12aa47b564247e2b10ed1a Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 17 Sep 2022 16:51:50 +0300 Subject: [PATCH] power_fields: fix comparison operators --- src/openpower/decoder/power_fields.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openpower/decoder/power_fields.py b/src/openpower/decoder/power_fields.py index 80aa1d4e..e7d353b5 100644 --- a/src/openpower/decoder/power_fields.py +++ b/src/openpower/decoder/power_fields.py @@ -8,6 +8,7 @@ from openpower.decoder.selectable_int import ( SelectableInt as _SelectableInt, BitRange as _BitRange, selectconcat as _selectconcat, + selectltu as _selectltu, ) @@ -62,10 +63,10 @@ class Reference: else: raise ValueError(other) - return op(lhs, rhs) + return op(int(lhs), int(rhs)) def __lt__(self, other): - return self.__binary_operator(_operator.lt, other) + return self.__binary_operator(_selectltu, other) def __eq__(self, other): return self.__binary_operator(_operator.eq, other) -- 2.30.2