From: Dmitry Selyutin Date: Mon, 5 Sep 2022 17:58:13 +0000 (+0300) Subject: power_enum: tune SVExtra representation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc7f36a47d61aa123fca21d46131889ec68d4e23;p=openpower-isa.git power_enum: tune SVExtra representation --- 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