From 4e1b994d20e3ae3a7db4491a17a762671c77a266 Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Tue, 26 Sep 2023 20:28:16 -0700 Subject: [PATCH] fix concat when the first argument is a FieldSelectableInt --- src/openpower/decoder/selectable_int.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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() -- 2.30.2