sv_binutils: support opcodes offset representation
authorDmitry Selyutin <ghostmansd@gmail.com>
Wed, 21 Sep 2022 15:07:01 +0000 (18:07 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Sat, 24 Sep 2022 09:07:36 +0000 (12:07 +0300)
src/openpower/sv/sv_binutils.py

index f555bea63c95a9bfdf4edb4d4e706ed56b60eae9..b77b8229f1c700fe1da16f4cb12040f13fd5b92c 100644 (file)
@@ -397,6 +397,9 @@ class Opcodes(Object, c_typedef="const struct svp64_opcode *"):
         self.__offset = offset
         return super().__init__()
 
+    def __repr__(self):
+        return f"{self.__class__.__name__}({self.__offset})"
+
     @classmethod
     def c_var(cls, name, prefix="", suffix=""):
         return f"{prefix}{cls.c_typedef}{name}{suffix}"