From: Dmitry Selyutin Date: Sun, 4 Jun 2023 09:20:26 +0000 (+0300) Subject: power_enums: simplify extra idx string conversion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8ca9bb199b9e7a36be7940489e67786d314ac1e;p=openpower-isa.git power_enums: simplify extra idx string conversion --- diff --git a/src/openpower/decoder/power_enums.py b/src/openpower/decoder/power_enums.py index 95cc4ae9..1e512d8a 100644 --- a/src/openpower/decoder/power_enums.py +++ b/src/openpower/decoder/power_enums.py @@ -239,14 +239,14 @@ class SVExtra(Enum): Idx3 = 4 Idx_1_2 = 5 # due to weird BA/BB for crops - def __repr__(self): + def __str__(self): return { SVExtra.NONE: "NONE", - SVExtra.Idx0: "extra0", - SVExtra.Idx1: "extra1", - SVExtra.Idx2: "extra2", - SVExtra.Idx3: "extra3", - SVExtra.Idx_1_2: "extra1/extra2", + SVExtra.Idx0: "EXTRA0", + SVExtra.Idx1: "EXTRA1", + SVExtra.Idx2: "EXTRA2", + SVExtra.Idx3: "EXTRA3", + SVExtra.Idx_1_2: "EXTRA1/EXTRA2", }[self] # Backward compatibility