From: Jacob Lifshay Date: Tue, 7 Nov 2023 04:41:11 +0000 (-0800) Subject: copy_assign_rhs must retain subclasses of SelectableInt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4708abcde4a55075205d59c48361fafabb277370;p=openpower-isa.git copy_assign_rhs must retain subclasses of SelectableInt --- diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index 2c937134..918a409e 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -10,6 +10,9 @@ 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.xer import XERState +from openpower.decoder.isa.svshape import SVSHAPE +from openpower.decoder.isa.svstate import SVP64State from openpower.decoder.fp_working_format import ( BFPState, SelectableMSB0Fraction) @@ -87,6 +90,14 @@ def copy_assign_rhs(inp): """ if isinstance(inp, (str, int)): return inp + if isinstance(inp, FPSCRState): + return FPSCRState(inp) + if isinstance(inp, XERState): + return XERState(inp) + if isinstance(inp, SVSHAPE): + return SVSHAPE(inp) + if isinstance(inp, SVP64State): + return SVP64State(inp) if isinstance(inp, (SelectableInt, FieldSelectableInt)): return SelectableInt(inp) if isinstance(inp, BFPState):