From f94e80725855602624dfabf8bdb0c309d41a57c5 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Wed, 17 Aug 2022 14:51:30 +0300 Subject: [PATCH] selectable_int: support int casts --- src/openpower/decoder/selectable_int.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2