From 4109d0fb1f768db66883d771842536bb5f74aba0 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Fri, 2 Jun 2023 19:20:09 +0300 Subject: [PATCH] power_insn: decouple into separate module --- src/openpower/decoder/isa/caller.py | 2 +- src/openpower/decoder/power_svp64_rm.py | 2 +- src/openpower/decoder/power_table.py | 2 +- src/openpower/insndb/__init__.py | 0 src/openpower/{decoder/power_insn.py => insndb/types.py} | 0 src/openpower/sv/sv_binutils.py | 4 ++-- src/openpower/sv/sv_binutils_fptrans.py | 2 +- src/openpower/sv/trans/pysvp64dis.py | 2 +- src/openpower/sv/trans/svp64.py | 8 ++++---- src/openpower/sv/trans/test_pysvp64dis.py | 2 +- src/openpower/sv/trans/test_pysvp64dis_branch.py | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 src/openpower/insndb/__init__.py rename src/openpower/{decoder/power_insn.py => insndb/types.py} (100%) diff --git a/src/openpower/decoder/isa/caller.py b/src/openpower/decoder/isa/caller.py index 9dd55b86..29691b92 100644 --- a/src/openpower/decoder/isa/caller.py +++ b/src/openpower/decoder/isa/caller.py @@ -35,7 +35,7 @@ from openpower.decoder.power_enums import (FPTRANS_INSNS, CRInSel, CROutSel, SVP64RMMode, SVPType, XER_bits, insns, spr_byname, spr_dict, BFP_FLAG_NAMES) -from openpower.decoder.power_insn import SVP64Instruction +from openpower.insndb.types import SVP64Instruction from openpower.decoder.power_svp64 import SVP64RM, decode_extra from openpower.decoder.selectable_int import (FieldSelectableInt, SelectableInt, selectconcat, diff --git a/src/openpower/decoder/power_svp64_rm.py b/src/openpower/decoder/power_svp64_rm.py index eeeede53..c14ead3e 100644 --- a/src/openpower/decoder/power_svp64_rm.py +++ b/src/openpower/decoder/power_svp64_rm.py @@ -3,7 +3,7 @@ # Funded by NLnet http://nlnet.nl # sigh this entire module is a laborious mess. it really should be -# auto-generated from the power_insn.py database but a technique +# auto-generated from the insndb/types.py database but a technique # for doing so (similar to python HTML/XML-node-walking) is needed """SVP64 RM (Remap) Record. diff --git a/src/openpower/decoder/power_table.py b/src/openpower/decoder/power_table.py index 985c6e52..7b83ba50 100644 --- a/src/openpower/decoder/power_table.py +++ b/src/openpower/decoder/power_table.py @@ -1,6 +1,6 @@ import collections from openpower.decoder.power_enums import find_wiki_dir -from openpower.decoder.power_insn import Database +from openpower.insndb.types import Database from openpower.util import log sections = {} diff --git a/src/openpower/insndb/__init__.py b/src/openpower/insndb/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/src/openpower/decoder/power_insn.py b/src/openpower/insndb/types.py similarity index 100% rename from src/openpower/decoder/power_insn.py rename to src/openpower/insndb/types.py diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index b4dea0ac..f08f70c6 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -22,8 +22,8 @@ from openpower.decoder.power_enums import ( find_wiki_dir as _find_wiki_dir, ) from openpower.consts import SVP64MODE as _SVP64MODE -from openpower.decoder.power_insn import Database as _Database -from openpower.decoder.power_insn import SVP64Instruction as _SVP64Instruction +from openpower.insndb.types import Database as _Database +from openpower.insndb.types import SVP64Instruction as _SVP64Instruction DISCLAIMER = """\ diff --git a/src/openpower/sv/sv_binutils_fptrans.py b/src/openpower/sv/sv_binutils_fptrans.py index cbe59b8e..ac26657b 100644 --- a/src/openpower/sv/sv_binutils_fptrans.py +++ b/src/openpower/sv/sv_binutils_fptrans.py @@ -8,7 +8,7 @@ from openpower.decoder.power_enums import ( FPTRANS_INSNS as _FPTRANS_INSNS, find_wiki_dir as _find_wiki_dir, ) -from openpower.decoder.power_insn import ( +from openpower.insndb.types import ( Database as _Database, StaticOperand as _StaticOperand, WordInstruction as _WordInstruction, diff --git a/src/openpower/sv/trans/pysvp64dis.py b/src/openpower/sv/trans/pysvp64dis.py index 5e1d6ad0..720963ba 100644 --- a/src/openpower/sv/trans/pysvp64dis.py +++ b/src/openpower/sv/trans/pysvp64dis.py @@ -6,7 +6,7 @@ import os from openpower.decoder.power_enums import ( find_wiki_dir, ) -from openpower.decoder.power_insn import ( +from openpower.insndb.types import ( Style, Database, WordInstruction, diff --git a/src/openpower/sv/trans/svp64.py b/src/openpower/sv/trans/svp64.py index e5a59ffc..f05cefd1 100644 --- a/src/openpower/sv/trans/svp64.py +++ b/src/openpower/sv/trans/svp64.py @@ -28,10 +28,10 @@ from openpower.decoder.pseudo.pagereader import ISA from openpower.decoder.power_svp64 import SVP64RM, get_regtype, decode_extra from openpower.decoder.selectable_int import SelectableInt from openpower.consts import SVP64MODE -from openpower.decoder.power_insn import SVP64Instruction -from openpower.decoder.power_insn import Database -from openpower.decoder.power_insn import Style -from openpower.decoder.power_insn import WordInstruction +from openpower.insndb.types import SVP64Instruction +from openpower.insndb.types import Database +from openpower.insndb.types import Style +from openpower.insndb.types import WordInstruction from openpower.decoder.power_enums import find_wiki_dir # for debug logging diff --git a/src/openpower/sv/trans/test_pysvp64dis.py b/src/openpower/sv/trans/test_pysvp64dis.py index e06fe45e..13c2152d 100644 --- a/src/openpower/sv/trans/test_pysvp64dis.py +++ b/src/openpower/sv/trans/test_pysvp64dis.py @@ -1,7 +1,7 @@ from openpower.simulator.program import Program from openpower.sv.trans.pysvp64dis import load, dump from openpower.sv.trans.svp64 import SVP64Asm -from openpower.decoder.power_insn import Database, Style +from openpower.insndb.types import Database, Style from openpower.decoder.power_enums import find_wiki_dir from openpower.sv import sv_binutils_fptrans import unittest diff --git a/src/openpower/sv/trans/test_pysvp64dis_branch.py b/src/openpower/sv/trans/test_pysvp64dis_branch.py index 9a2d54b9..c809cba8 100644 --- a/src/openpower/sv/trans/test_pysvp64dis_branch.py +++ b/src/openpower/sv/trans/test_pysvp64dis_branch.py @@ -1,7 +1,7 @@ from openpower.simulator.program import Program from openpower.sv.trans.pysvp64dis import load, dump from openpower.sv.trans.svp64 import SVP64Asm -from openpower.decoder.power_insn import Database, Style +from openpower.insndb.types import Database, Style from openpower.decoder.power_enums import find_wiki_dir from openpower.sv import sv_binutils_fptrans import unittest -- 2.30.2