From: Jacob Lifshay Date: Wed, 27 Sep 2023 03:28:16 +0000 (-0700) Subject: fix concat when the first argument is a FieldSelectableInt X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=157d8bb1088f308c4e804d1bfaa7dc643a9ce491;p=openpower-isa.git fix concat when the first argument is a FieldSelectableInt --- diff --git a/src/openpower/decoder/selectable_int.py b/src/openpower/decoder/selectable_int.py index 1490a453..30dddf65 100644 --- a/src/openpower/decoder/selectable_int.py +++ b/src/openpower/decoder/selectable_int.py @@ -562,7 +562,11 @@ def selectconcat(*args, repeat=1): for i in range(repeat): tmp += args args = tmp - res = copy(args[0]) + if isinstance(args[0], FieldSelectableInt): + res = args[0].get_range() + else: + assert isinstance(args[0], SelectableInt), "can only concat SIs, sorry" + res = SelectableInt(args[0]) for i in args[1:]: if isinstance(i, FieldSelectableInt): i = i.get_range()