From: Dmitry Selyutin Date: Wed, 20 Apr 2022 12:27:57 +0000 (+0000) Subject: sv_binutils: generate fields tables X-Git-Tag: sv_maxu_works-initial~471 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd48a3695fd182387db041e6dd581fcf9441f49c;p=openpower-isa.git sv_binutils: generate fields tables --- diff --git a/src/openpower/sv/sv_binutils.py b/src/openpower/sv/sv_binutils.py index 9d9ce41c..114e7c6f 100644 --- a/src/openpower/sv/sv_binutils.py +++ b/src/openpower/sv/sv_binutils.py @@ -474,6 +474,13 @@ class Codegen(_enum.Enum): yield from indent(num_entries.c_value(suffix=";")) yield "" + for mapping in (Prefix, RM): + name = mapping.__name__.lower() + yield from mapping.c_var(name=f"svp64_{name}_entries", prefix="static ", suffix="[] = \\") + yield from mapping().c_value(suffix=";") + yield "" + yield "" + entries = Entry[...](entries) num_entries = Size("(sizeof (svp64_entries) / sizeof (svp64_entries[0])")