From f8ca9bb199b9e7a36be7940489e67786d314ac1e Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sun, 4 Jun 2023 12:20:26 +0300 Subject: [PATCH] power_enums: simplify extra idx string conversion --- src/openpower/decoder/power_enums.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -- 2.30.2