From b2a612927ecc8bb42cab1b15ee2de877e8a1508f Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 6 Nov 2023 20:41:11 -0800 Subject: [PATCH] copy_assign_rhs must retain subclasses of SelectableInt --- src/openpower/decoder/helpers.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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): -- 2.30.2