From: Jacob Lifshay Date: Fri, 12 May 2023 06:38:09 +0000 (-0700) Subject: allow assigning BFPState and SelectableMSB0Fraction values in pseudo-code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bfd616b0d33add9c423e1572fa331064bfb050db;p=openpower-isa.git allow assigning BFPState and SelectableMSB0Fraction values in pseudo-code --- diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index a7d8a37d..6d4c6d9a 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -10,6 +10,8 @@ from openpower.decoder.selectable_int import selectltu as ltu from openpower.decoder.selectable_int import selectgtu as gtu from openpower.decoder.selectable_int import check_extsign from openpower.fpscr import FPSCRState +from openpower.decoder.fp_working_format import ( + BFPState, SelectableMSB0Fraction) from openpower.util import log import math @@ -87,6 +89,10 @@ def copy_assign_rhs(inp): return inp if isinstance(inp, (SelectableInt, FieldSelectableInt)): return SelectableInt(inp) + if isinstance(inp, BFPState): + return BFPState(inp) + if isinstance(inp, SelectableMSB0Fraction): + return SelectableMSB0Fraction(inp) if isinstance(inp, tuple): return tuple(map(copy_assign_rhs, inp)) if isinstance(inp, dict):