From bc7f36a47d61aa123fca21d46131889ec68d4e23 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 5 Sep 2022 20:58:13 +0300 Subject: [PATCH] power_enum: tune SVExtra representation --- src/openpower/decoder/power_enums.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 29faffb1..cf08672a 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -209,6 +209,16 @@ class SVExtra(Enum): Idx3 = 4 Idx_1_2 = 5 # due to weird BA/BB for crops + def __repr__(self): + return { + SVExtra.NONE: "NONE", + SVExtra.Idx0: "[0]", + SVExtra.Idx1: "[1]", + SVExtra.Idx2: "[2]", + SVExtra.Idx3: "[3]", + SVExtra.Idx_1_2: "[1:2]", + }[self] + # Backward compatibility SVEXTRA = SVExtra -- 2.30.2