sv_binutils: drop opcode structure
authorDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Tue, 25 Jan 2022 18:47:26 +0000 (18:47 +0000)
committerDmitry Selyutin <dmitry.selyutin@3mdeb.com>
Sat, 29 Jan 2022 14:33:41 +0000 (14:33 +0000)
src/openpower/sv/sv_binutils.py

index 9ceeee63a0e430b392502289310129587c676075..7c9244b400d8a8841acf1ad4e53be0ed4b0f83ec 100644 (file)
@@ -216,16 +216,12 @@ class Record(CType):
 @_dataclasses.dataclass(eq=True, frozen=True)
 class Entry(CType):
     name: Name
-    opcode: Opcode
     record: Record
 
     def __lt__(self, other):
         if not isinstance(other, self.__class__):
             return NotImplemented
 
-        if self.name == other.name:
-            return self.opcode < other.opcode
-
         return self.name < other.name
 
     @classmethod
@@ -282,9 +278,6 @@ class Codegen(_enum.Enum):
             yield "#endif"
             yield ""
 
-            yield from Opcode.c_decl()
-            yield ""
-
             enums = (
                 In1Sel, In2Sel, In3Sel, OutSel,
                 CRInSel, CROutSel,
@@ -418,7 +411,7 @@ def parse(path, opcode_cls):
 
                 record[key] = value
 
-            yield Entry(name=name, opcode=opcode, record=Record(**record))
+            yield Entry(name=name, record=Record(**record))
 
 
 def main(codegen):