From f9164ce5ea5260f3e94a08ed684af7104b406e11 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Sat, 30 Jul 2022 15:42:10 +0300 Subject: [PATCH] sv_binutils: introduce svp64_opindex_rm_field routine --- src/openpower/sv/sv_binutils.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 9695bc1b..1dd56ad6 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -509,10 +509,9 @@ class Codegen(_enum.Enum): yield from cls.c_decl() yield "" - for name in ("in1", "in2", "in3", "out", "out2", "cr_in", "cr_out"): - yield "ppc_opindex_t" - yield f"svp64_desc_{name}_opindex(const struct svp64_desc *desc);" - yield "" + yield "enum svp64_rm_field" + yield "svp64_opindex_rm_field (const struct svp64_desc *desc, ppc_opindex_t opindex);" + yield "" yield records.__class__.c_var("svp64_records", prefix="extern const ", suffix=";") @@ -546,7 +545,7 @@ class Codegen(_enum.Enum): def opindex(enum, name, table): sep = (max(map(len, list(table.values()) + ["UNUSED"])) + 1) c_tag = f"svp64_{enum.__name__.lower()}" - yield "ppc_opindex_t" + yield "static inline ppc_opindex_t" yield f"svp64_desc_{name}_opindex(const struct svp64_desc *desc)" yield "{" yield from indent(["static const ppc_opindex_t table[] = {"]) -- 2.30.2