From: Dmitry Selyutin Date: Sat, 17 Sep 2022 13:51:50 +0000 (+0300) Subject: power_fields: fix comparison operators X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=489305f987997f778f12aa47b564247e2b10ed1a;p=openpower-isa.git power_fields: fix comparison operators --- 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)