From: Dmitry Selyutin Date: Wed, 17 Aug 2022 11:51:30 +0000 (+0300) Subject: selectable_int: support int casts X-Git-Tag: sv_maxu_works-initial~49 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f94e80725855602624dfabf8bdb0c309d41a57c5;p=openpower-isa.git selectable_int: support int casts --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index e0d2c6ab..5a8a9b9d 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -459,6 +459,9 @@ class SelectableInt: def asint(self): return self.value + def __int__(self): + return self.asint() + def __float__(self): """convert to double-precision float. TODO, properly convert rather than a hack-job: must actually support Power IEEE754 FP