power_insn: rename unit field to function
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 29 Aug 2022 18:16:18 +0000 (21:16 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Tue, 30 Aug 2022 06:57:50 +0000 (09:57 +0300)
src/openpower/decoder/power_insn.py

index 72253cc09dc245bd98f3c1c0cfe6293ee8171241..df5a5cb6a89376a82dd3db7ca656649c178f1204 100644 (file)
@@ -188,7 +188,7 @@ class PPCRecord:
     comment: str
     flags: Flags = Flags()
     comment2: str = ""
-    unit: _Function = _Function.NONE
+    function: _Function = _Function.NONE
     intop: _MicrOp = _MicrOp.OP_ILLEGAL
     in1: _In1Sel = _In1Sel.RA
     in2: _In2Sel = _In2Sel.NONE
@@ -205,6 +205,7 @@ class PPCRecord:
     unofficial: bool = False
 
     __KEYMAP = {
+        "unit": "function",
         "internal op": "intop",
         "CR in": "cr_in",
         "CR out": "cr_out",
@@ -451,7 +452,7 @@ class Record:
 
     @property
     def function(self):
-        return self.ppc.unit
+        return self.ppc.function
 
     @property
     def in1(self):